View Single Post
  #5 (permalink)  
Old 01-09-2009, 01:27 PM
fizzlesquirt fizzlesquirt is offline
WebProWorld Member
 
Join Date: Jul 2003
Posts: 38
fizzlesquirt RepRank 0
Default Re: Flash and validation of code plus useage

I'm very conscience of valid markup as well. I came across this issue on our website when I was moving from tables to valid strict HTML 4.01. I came across an article that recommended using an external javascript so that is what I did. This also gets around the issue with Internet Explorer issue that required you to click on a flash movie to give it permission to run.

Create an external javascript (ex. initflash.js). In the initflash.js use the following:
-----
//intflash.js

document.write('<object type="application/x-shockwave-flash" data="yourflash.swf" width="110" height="301">');
document.write('<param name="movie" value="yourflash.swf" />');
document.write('<a href="http://www.macromedia.com/go/getflashplayer" target="_blank">');
document.write('This section requires the Macromedia Flash Player to view</a></object>');
-----

Then call the external javascript where you want it to appear in your html

<script src="initflash.js" type="text/javascript"></script>

This works great for me.
__________________
i think i brain my damaged...
Reply With Quote