Hello,
It's been a while since I last was using Flash and putting SWF files on the web. Back then I used SWFObject 2 and it seemed to work. I'm now using Flash CS5.5 (Flash 11.5.0) and the HTML that it creates does not work. I also tried the code in the official Adobe Help, which is the same:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="movie_name" align="middle">
<param name="movie" value="movie_name.swf"/>
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="movie_name.swf" width="550" height="400">
<param name="movie" value="movie_name.swf"/>
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player"/>
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
I've made the changes to absolute paths to my SWF files, and in Firefox and Chrome all I get is the button to go download the Flash Player. In Explorer 9 it works as expected. If I remove the 'if' statements for IE, it works fine in all three browsers, but something tells me that's not right either.
What is the current correct way to code the HTML to show a SWF?
Thanks kglad - I get the exact same behavior - the 'Get Flash Player' button in Firefox and Chrome, and a blank space matching the dimensions of the SWF in Explorer. If this makes any difference, it's a Wordpress site and I'm putting these on a Wordpress 'Page' so I'm not inluding all the header info from the HTML from Flash since it will conflcit with the Wordpress template.
I set up four instances here:
http://www.tomwood.us/flash-test/
The top one is a direct copy of everything inside the <object> tags from Flash. Firefox and Chrome give me the button, Explorer shows a blank grey space matching the dimensions of the SWF.
The next one is the same code except with the 'if IE' statements removed. Firefox gives me the button, Chrome and Explorer show a blank space matching the SWF dimensions.
The next one has a working path to the SWF, with the 'if IE' statements in place. Firefox and Chrome give the button, Explorer displays the SWF.
The next one has a working path to the SWF and the 'if IE' statements removed. All three browsers show the SWF.
North America
Europe, Middle East and Africa
Asia Pacific