Here is the method we use:
There's 2 parts... an external JS file and the call within your HTML page:
Save the following code as an external file (in this example I called it 'flashfix.js' within a directory called 'js')
---------------------------------------------------
function ieFix(filePath, theHeight, theWidth, varName, cookieVar, bgColor) {
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
http://fpdownload.macromedia.com/pub...ersion=7,0,0,0" width="' + theWidth + '" height="' + theHeight + '" id="' + filePath + '" align="middle">\n');
document.write('<param name="allowScriptAccess" value="sameDomain">\n');
document.write('<param name=movie VALUE="' + filePath + '.swf">\n');
document.write('<param name=quality VALUE=high>\n');
document.write('<param name="flashvars" value="' + varName + '=' + cookieVar + '">\n');
document.write('<param name=scale VALUE=noborder>\n');
document.write('<param name=menu VALUE=false>\n');
document.write('<param name="wmode" value="transparent" />\n');
document.write('<param name=bgcolor VALUE=#' + bgColor + '>\n');
document.write('<embed id="flash" src="' + filePath + '.swf" wmode="transparent" quality="high" flashvars="' + varName + '=' + cookieVar + '" bgcolor="#' + bgColor + '" width="' + theWidth + '" height="' + theHeight + '" name="' + filePath + '" align="center" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="
http://www.macromedia.com/go/getflashplayer">\n');
document.write('</object>\n');
}
---------------------------------------------------
Then add the JS file within <head></head> tags:
---------------------------------------------------
<script src="js/flashfix.js" type="text/javascript"></script>
---------------------------------------------------
And finally the call within your HTML:
---------------------------------------------------
<script type="text/javascript">ieFix('flash_movie',500,800,'','','fff fff');</script>
---------------------------------------------------
Set both 'varName' and 'cookieVar' to '' - they are used only if you are passing variables to Flash
Don't include '.swf' in the filePath