swfObject 2 - Not working in IE

I used the ‘generator’ to create the ‘embed’ code… works fine in FF, but not in IE.

According to the waffle on the site, you don’t need to use both **embed **and **object **tags any more, as the latest version takes care of everything… allegedly! :stare:

Has anyone successfully embedded a swf in an html file using swfObject2… and can someone post a HTML snippet please.

Thanks,
Pablo

[FONT=Arial][/FONT]

Sorted. Turned out to be a dodgy registry entry!

If anyone else is having IE/flash problems try this thread…

http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19166

Direct install worked eventually (online update via Active X kept bombing)
http://www.adobe.com/support/flashplayer/ts/documents/tn_19166/Install_Flash_Player_9_ActiveX.zip

…and for future reference, If anyone is after a known clean snippet, this one works fine with IE/FF.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
		<title>swfObject 2 Test</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">
			var flashvars = {};
			var params = {};
			var attributes = {};
			attributes.id = "banner";
			attributes.name = "banner";
			swfobject.embedSWF("homeBanner.swf", "myAlternativeContent", "700", "150", "8.0.0", "expressInstall.swf", flashvars, params, attributes);
		</script>

</head>

<body>
<div id="myAlternativeContent">

<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a>

</div>
</body>
</html>

you can use http://www.swffix.org/swfobject/generator/ as well which is provided as a resource on google code. just make sure to always check he dynamic checkbox, even if you’re content isn’t gonna be dynamic.

Thanks for the tip.

Pablo