July 25th, 2008 by Kyle
Tags: , , , ,
Posted in: Flash Player, Flex


A while back I posted this entry showing off my first Google Gadget that embedded a swf for Flash Player version detection.

http://blog.flexmonkeypatches.com/2008/01/25/google-gadget-flash-player-version-checker/

Recently someone posted a comment asking how I did that. I figured I might as well post the code. So here it is:

  1.  
  2. <?xml version="1.0" encoding="UTF-8" ?>
  3. <module>
  4. <modulePrefs title="Flash Version Checker" height="295" width="760" scrolling="false"
  5. description="Uses the swf from Adobe Support Technote: http://www.adobe.com/go/tn_15507 to detect version of Flash Player used in your browser."
  6. author="Kyle Quevillon"
  7. author_email="turdontherun+flashversionchecker@yahoo.com"
  8. author_photo="http://739saintlouis.com/images/me.jpg"
  9. screenshot="http://739saintlouis.com/images/flashversionchecker_screenshot.PNG"
  10. thumbnail="http://739saintlouis.com/images/flashversionchecker_thumbnail.png"
  11. author_aboutme="I work for Adobe Systems Inc. as a Senior Support Engineer for the Flex product line. I have sort of followed an odd career path in what would typically be a reverse order, having started as a Software Developer/Engineer, moving on to become a Software Quality(Assurance/Control) Engineer and now ending up a Software Support Engineer. I think I have found a good fit as I have always been good at discovering problems, understanding other peoples issues and proposing new (or tried and true) methods for solving them."
  12. >
  13. <require feature="flash" />
  14. </modulePrefs>
  15. <content type="html">
  16. <![CDATA[
  17. <div id="flashcontainer" style="text-align: center; vertical-align:center"></div>
  18.  
  19. <script type="text/javascript">
  20.  
  21. // Display SWF
  22. function showSWF() {
  23. // The URL for the .swf
  24. var url = "http://www.adobe.com/support/flash/ts/documents/test_version/version.swf";
  25.  
  26. // Play .swf file.
  27. _IG_EmbedFlash(url, "flashcontainer", {
  28. swf_version: 6,
  29. id: "flashid",
  30. width: 350,
  31. height: 250
  32. })
  33. }
  34.  
  35. // When gadget first loads, display still photo.
  36. _IG_RegisterOnloadHandler(showSWF);
  37. </script>
  38. <!--
  39. <br/>
  40. <center>
  41. <a href="http://fusion.google.com/add?source=atgs&moduleurl=http%3A//hosting.gmodules.com/ig/gadgets/file/117092112381789410143/detect-flash-player-version.xml">
  42. <img src="http://gmodules.com/ig/images/plus_google.gif" border="0" alt="Add to Google">
  43. </a>
  44. </center>
  45. -->
  46. ]]>
  47. </content>
  48. </module>
  49.  
  50.  



2 Comments »

I just wrote a simple Google gadget that wraps the flash player version checking swf on the Adobe Support site.

I thought it would be a good intro for me on how to create Google gadgets and a useful one at that!




3 Comments »