views:

214

answers:

3

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?

A: 

Use both object and embed tag. Some browsers use the tag and 'name' to get to the swf, others use and 'id'

George Profenza
Does not work
Johan
then does this mean <embed src="myclip.swf" width="550" height="400" /> works in more situations than object ?
George Profenza
embed should work...I'm guessing you knew you should set src, not movie.
George Profenza
also, why not use the generated html from flash, or swfobject ?
George Profenza
+2  A: 

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.

James Wheare
+1  A: 

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.

Johan
Yes, `embed` is deprecated and not necessary in modern browsers (not even IE6 IIRC). It's a pain to find the right combination of attributes though. I can never remember the right ones.
DisgruntledGoat