1 Reply Latest reply on Aug 24, 2010 1:50 PM by jareed123

    cross-browser compatible flash embedding in html5

    maple-leaf

      I am a newbie with flash with less than a year of experience and this is my first post in this forum.

       

      I recntly converted my web site from xhtml1.1 to html5 and when it came to flash I was a bit stumped.

       

      Then the light came on, why not use html5's new and powerful JavaScript engine and I did.

       

      I was able to use JavaScript to embed the flash object which tested with IE8, FF3.6.4, Safari 5.0, Opera 10.53, SeaMonkey 2.4, Chrome 5,6 and maxthin 2.5 & 3.0.

       

      I wanted also to keep away from making a http call for swfobject and use the html5 enviornment.

       

      Therefore, I used the following and placing the JavaScript function within the <head>..</head> tags just above the <body> tag.

       

      My web site is multi-lingual currently with/for English and German with French and Spanish to follow; the html5 used is simple and it W3C validates it as html5.

       

      Using the english version this was placed within the head tags

       

      <script>

             //<![CDATA[

           document.write('<object width="100%" height="100%"  type="application/x-shockwave-flash" data="english.swf"  >');

           document.write('<param name="classid"  value="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" />');

           document.write('<param name="pluginurl" value="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24"  />');

           document.write('<param name="movie" value="english.swf"  />');

           document.write('<param name="quality" value="best" />');

           document.write('<param name="menu" value="false" />');

           document.write('<param name="allowFullScreen" value="true"  />');

           document.write('<param name="allowScriptAccess" value="sameDomain"  />');

           document.write('<param name="bgcolor" value="#000000"  />');

           document.write('<param name="scale" value="noscale"  />');

           document.write('<param name="wmode" value="window" />');

           document.write('</object>');

              //]]>

      </script>

       

      I have also noticed that an iPAD visited my wbe site indicatingn to me that it works on an iPAD and by virtue that this method of flash embedding works with the above borwser types; it is I think a cross-browser method.

       

      To see this in action feel free to visit my web site and look at the index.html, english.html or the german.html code to see this implemented; the web site is www.mirana.net

       

      Now my questions is:

       

      1. is this a good method and why? or why not?

      2. can this be placed mainstream ?

       

      Thank you for reading this and be merciful in responses

        • 1. Re: cross-browser compatible flash embedding in html5
          jareed123

          Hello,

           

          I am a beginner Dreamweaver and Flash CS3 user and I am having problems with PC browsers displaying my background color and font styles. Everything works fine in mac browsers.

           

          I have been using Dreamweaver for really basic stuff for over a year and have never had this problem before. However for this project, I embedded a few Flash components so I am wondering if this is causing the problem. My embedded flash videos and slideshows work fine in both browsers. The only problem is the background color and font style in PC browsers.

           

          I have never posted to a forum before but I am spinning my wheels on this. It seems like there could be a simple solution or explanation....however I can't seem to find any solutions online.

           

          Any help or guidance would be amazing!

           

          Jen