SWFObject Is Not Defined
If you’re having trouble with SWFObject.js and getting a “n is not defined” error, you’re probably not alone.
The mistake I made was not creating a <div> tag with the id name specified in my SWF creation script.
I needed this…
<div id="flashcontent1">
</div>
For this to work
<script type="text/javascript">
var so = new SWFObject("mslide_show.swf", "mymovie", "211", "319", "6", "#FFFFFF");
so.addVariable("quality", "high");
so.addVariable("menu", "false");
so.addVariable("pluginurl", "http://www.macromedia.com/go/getflashplayer");
so.write("flashcontent1");
</script>
2 Comments:
At January 31, 2009 8:57 PM ,
raster said...
naw, I never had that problem, but someone else might, so it's good that you posted this...
At February 14, 2009 1:48 PM ,
Kevin said...
A lot of people will actually place the javascript inside their div, and SWFObject will overwrite it.
Post a Comment
<< Home