Normally Flash outputs 2 object tags in the HTML when you publish a project. One is supposed to be for IE while one is for non-IE browsers. Now I tried erasing the IE part and just left this. And it seems to be working in FF, Chrome and IE6 . Does anybody know if using this shorter version is OK? Why do we normally have 2 objects tags?
<object data="a.swf" type="application/x-shockwave-flash" height="400" width="550"> <param name="movie" value="a.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="play" value="true" /> <param name="loop" value="true" /> <param name="wmode" value="window" /> <param name="scale" value="showall" /> <param name="menu" value="true" /> <param name="devicefont" value="false" /> <param name="salign" value="" /> <param name="allowScriptAccess" value="sameDomain" /> <a href="http://www.adobe.com/go/getflash"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /> </a> </object>
- Author was Featured
- Sold between 50 000 and 100 000 dollars
- Author had a Free File of the Month
- Bought between 1 and 9 items
- Exclusive Author
- Has been a member for 3-4 years
- Referred between 10 and 49 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
Thanks. So it says it is OK right? (as long as you have a little preloader for IE to start playing without waiting dowload to complete. For large, single SWF projects it may not look good on IE) Of course you can get rid of unnecessary param tags as well. But I think leaving adobe getFlash link would be in order.
Yeah but, why use extra JS code if same outcome can be achieved with much shorter code?
If you need to place multiple SWFs on a page JS can make things shorter but when you want 1-2 SWFs on a page I don’t like extra JS.
That’s what I wanted to learn, that shorter version seems to be working on all browsers without the need for JS. (except for IE you need a low size preloader which I usually use anyway)
SwfObject deals with a lot of various browser quirks.
It’s a standard for embedding flash content, and it is recommended by Adobe.