Jump to content
xmanmonk

How to embed swf for html4 & 5

Recommended Posts

I have a page with an embedded swf file, and it works great on just about every browser I have. I'm using the embed tag inside the object tag to accommodate both ie and the rest of the gang. However, it won't display on the iPad, I'm guessing because of the strict html5 stance. Is there a way to have this same code support all three? The code I have looks something like this: <object classid=... <param name="Movie" value="file.swf" ... <embed name="Sample" value="file.swf"... /> </embed></object> Any assistance will be greatly appreciated. Thanks!

Share this post


Link to post
Share on other sites
<object data="file.swf" type="application/x-shockwave-flash" width="..." height="...">    <param name="movie" value="file.swf">     <!-- If flash is not installed -->    <p>You need Adobe Flash Player to view this content</p></object>

Share this post


Link to post
Share on other sites

Right, thanks. It is good to tell them that flash is needed if it doesn't play. However, I thought the embed tag was needed in certain browsers. This will play in html4 and html5? On an iPad and on an old Chrome browser?

Edited by xmanmonk

Share this post


Link to post
Share on other sites

The <embed> tag is not even valid HTML. The W3C validator would show an error for it. The code I gave you should work on every single browser.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×