Customizing the IE / Flash Fix Kirupa posted

Ok so I’m using the new code generator that Kirupa has made to fix this whole ActiveX IE - Flash conflict we’re all experiencing … and I just wanted to know if there was any way of customizing it …

So say I had this script originally:

 
[SIZE=1]<script type="text/javascript" src="flashobject.js"></script>
<!-- 
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) {  // if we've detected an acceptable version
    var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
    + 'width="100%" height="100%"'
    + 'codebase="[/SIZE][[SIZE=1]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'[/SIZE]](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab&quot;>')
[SIZE=1]   + '<param name="movie" value="index.swf" /><param name="loop" value="false" /><param name="menu" value="false" /><param [/SIZE]
[SIZE=1]name="quality" value="high" /><param name="scale" value="noscale" /><param name="bgcolor" value="#000000" />'
    + '<embed src="index.swf" loop="false" menu="false" quality="high" scale="noscale" bgcolor="#000000" '
    + 'width="100%" height="100%" name="index" align="middle"'
    + 'play="true"'
    + 'loop="false"'
    + 'quality="high"'
    + 'allowScriptAccess="sameDomain"'
    + 'type="application/x-shockwave-flash"'
    + 'pluginspage="[/SIZE][[SIZE=1]http://www.macromedia.com/go/getflashplayer">'[/SIZE]](http://www.macromedia.com/go/getflashplayer&quot;>')
[SIZE=1]   + '<\/embed>'
    + '<\/object>';
    document.write(oeTags);   // embed the flash movie
  } else {  // flash is too old or we can't detect the plugin
    var alternateContent = 'Alternate HTML content should be placed here.'
   + 'This content requires the Macromedia Flash Player.'
    + '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
    document.write(alternateContent);  // insert non-flash content
  }
// -->
</script>[/SIZE]

And this was my new generated code:

 
[SIZE=1]<script type="text/javascript" src="flashobject.js"></script>[/SIZE]
 
[SIZE=1]<div id="flashcontent" style="width: 793px; height: 772px">[/SIZE]
[SIZE=1]<script type="text/javascript">
var fo = new FlashObject("index.swf", "animationName", "793", "772", "8", "#000000");
fo.addParam("allowScriptAccess", "sameDomain");
fo.addParam("quality", "high");
fo.addParam("scale", "noscale");
fo.addParam("loop", "false");
fo.write("flashcontent");
</script>[/SIZE]

Help please! Or another workaround would be great (i just want to have my movie centered like it was before…)

Thanks! :thumb:
Boon out.

I have a few flashobject html templates available for download here: http://www.onebyonedesign.com/downloads/FO_HTMLtemplates.zip

one should allow you to center your flash movie.

Hey thanks! I’ll check em out!

For simple parameter additions, you could simply tag on more fo.addParam(…) lines.

For example, my code does not contain the type and pluginspage details, and you can add those in by using the following two lines:


fo.addParam("type", "application/x-shockwave-flash");
fo.addParam("pluginspage", "http://www.macromedia.com/go/getflashplayer");

:beam:

Thanks Kirupa! :thumb2: