
Originally Posted by
AfroNinja
I currently just use javascript include and in the javascript file I document.write the code that displays the flash and it works fine. However it doesn't seem to work in IE7? any experience with this?
Although I prefer SWFObject for its versatility, it's easy enough to use the JavaScript solution you mentioned.
Create a file called movie.js, for instance, with the following code (you'll need to edit the size, movie name, Flash version, paths, etc:
Code:
function RunMovie()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0" id="movie" width="300" height="300">\n');
document.write('<param name="movie" value="movie.swf">\n');
document.write('<param name="quality" value="high">\n');
document.write('<param name="wmode" value="transparent">\n');
document.write('<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" name="header" width="300" height="300" src="movie.swf" quality="high" wmode="transparent" swliveconnect="true" allowscriptaccess="samedomain"></embed>\n');
document.write('</object>\n');
}
Add this between your <head> tags:
Code:
<script src="movie.js" type="text/javascript"></script>
Then simply add this code where you'd like your movie to display:
Code:
<script type="text/javascript">RunMovie();</script>
If you're doing it like that, IE7 should have no problems at all, and there should be no "click to activate" problem either.
One thing, it is a sort of validation "cheat" though.
OT: Sorry for the bump, but I thought this info might be useful to someone.
Cheers,
Bookmarks