Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed flash in html

Tags:

html

flash

embed

In chrome, ie and safari this is not a problem, but in firefox it is.

I use <object> for my flashclip.

<object type="application/x-shockwave-flash"> 
    <param name="movie" value="myclip.swf" /> 
    <param name="quality" value="high" /> 
</object>

What am I doing wrong?

like image 309
Johan Avatar asked Aug 26 '09 08:08

Johan


2 Answers

After some testing, this works fine:

<object type="application/x-shockwave-flash" data="myclip.swf" 
    width="550" height="400"> 

    <param name="movie" value="myclip.swf" />
    <param name="quality" value="high" />
</object>

Firefox needed both data, width and height.

like image 141
Johan Avatar answered Sep 23 '22 10:09

Johan


For cross browser flash embedding, you need to use both <object> and <embed> tags, nested inside one another, and it might also help to include the data attribute on the <object> like this:

<object type="application/x-shockwave-flash" data="myclip.swf"> 
    <param name="movie" value="myclip.swf" />
    <param name="quality" value="high" />
    <!-- Sandwich the embed tag inside the object tag -->
    <embed src="myclip.swf" quality="high" />
</object>

Alternatively, I'd suggest using the swfobject javascript micro-library for robust cross browser flash embedding.

like image 38
James Wheare Avatar answered Sep 20 '22 10:09

James Wheare