I have found a solution to my error in FireFox. I believe my error is due to the fact that I an using swfobject.js version 2.1 and not one of the older versions. If you look on http://code.google.com/p/swfobject/wiki/api you will see new code. Below is some of the SWFObject JavaScript API documentation found on that page. They indicate that "SWFObject 2 contains an API that allows JavaScript developers to reuse SWFObject's internal functions and aims to deliver a complete tool set for publishing SWF's and retrieving Flash player related information."
They say the following:
Don't specify the following attributes:
• classid:"D27CDB6E-AE6D-11cf-96B8-444553540000" (SWFObject publishes this automatically for Internet Explorer on Windows)
• type:"application/x-shockwave-flash" (SWFObject publishes this automatically for all browsers except Internet Explorer on Windows)
• codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" (deprecated)
Don't specify the following param element:
• movie (use the object element's data attribute instead, SWFObject publishes this automatically for Internet Explorer on Windows)
A basic example:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>SWFObject - low level dynamic publishing example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
if (swfobject.hasFlashPlayerVersion("6.0.0")) {
var fn = function() {
var att = { data:"test.swf", width:"780", height:"400" };
var par = { flashvars:"foo=bar" };
var id = "replaceMe";
var myObject = swfobject.createSWF(att, par, id);
};
swfobject.addDomLoadEvent(fn);
}
</script>
</head>
<body>
<div id="replaceMe">Alternative content</div>
</body>
</html>
I modified the above code example (changed path & swf file name that I used in my previous postings) and it worked very well. No errors in FireFox. And the path was found.
The only question I have is how to get the swf to loop. When I find out I will post.
I hope the above has been helpful.
Bookmarks