MozillaZine

EMBED tag Phased out

User Help for Mozilla Firefox
musashi39
 
Posts: 1
Joined: July 11th, 2006, 9:29 am

Post Posted July 16th, 2006, 12:19 pm

I recently added a flash presentation and I used what I thought was the standard <object blah... <embed></embed</object> and it worked fine. I went to validate my XHTML with w3c's validator and it said that the embed tag was not defined. I did research and found that embed is depreciated. So I took the Embed out thinking that only the object tag would be needed and now the site validates but doesn't work. the site is http://www.lpne.org

Thank you, Dan

trolly
Moderator

User avatar
 
Posts: 39243
Joined: August 22nd, 2005, 7:25 am

Post Posted July 16th, 2006, 12:27 pm

You need the embed tag for FF to recognize the media if you are using the IE specific classid attribute. If you need more info i move this thread to the "Web Developer" forum.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.

Guest
Guest
 

Post Posted July 16th, 2006, 12:31 pm

The embed tag was never part of any w3c recommendation. If you really want your page to validate, use this:
Code: Select all
<object id="AmericaFromFreedomToFascism"
     data="files/introduction.swf"
     type="application/x-shockwave-flash"
     width="550" height="400" >
 <param name="movie" value="files/introduction.swf" />
 <param name="quality" value="high" />
</object>


Validation is a tool to help authors troubleshoot and ensure compatibility in compliant user agents. There's nothing wrong if you have a bit of code that isn't valid but you need it in order for your page to work.

Vectorspace
Moderator

User avatar
 
Posts: 14455
Joined: November 27th, 2003, 4:50 am
Location: Warwickshire, UK

Post Posted July 16th, 2006, 2:36 pm

That code will work, but it has a flaw: IE in Windows will download the whole Flash movie before displaying it instead of streaming it like every other browser.

There are two ways of using the object tag:
ActiveX:
<object classid="ActiveX Control id" ...
<param name="source parameter name" value="source url">
<param...
</object>

And standard:
<object data="source url" type="plug-in MIME Type"...
<param...
</object>

ActiveX is IE-only, and IE does not yet understand the data attribute in an object tag so the standard use will fail in IE. You can use a hybrid like Guest did and that will work for Flash, apart form the fact it will not stream in IE.

A browser will render the code inside an object if it cannot render the object itself. That's why when you have an embed inside an object, IE does not render the embed (it rendered the object), and why Firefox does (it could not render the object)

What you should be able to do is replace the embed with another object - this will work in all browsers apart from IE, which will stupidly try to render both.

You can get around that using some special html comments:
Code: Select all
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
           codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
           width="???" height="???">
    <param name="movie" value="flash file location">
    <param name="quality" value="high">

     <!--[if !IE]> <-->
     <object data="flash file location"
               width="???" height="???" type="application/x-shockwave-flash">
          <param name="quality" value="high">

          FAIL: (the browser should render some flash content, not this).

     </object>
     <!--> <![endif]-->

</object>
The <!--[if !IE]> <--> and <!--> <![endif]--> comments cause IE to ignore everything between them. So IE ignores the standard object and just renders the ActiveX object, and Firefox renders the standard object since it cannot render the outer, ActiveX object.
"All things being equal, the simplest answer is usually the correct one" - Occam's Razor
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0

dpastern
Guest
 

Post Posted April 26th, 2008, 9:17 pm

Why can't FireFox just drop the damn <embed> code and become w3c compliant and rely on the <object> code and also hardcode FireFox to ignore the ActiveX stuff that IE relies on? That would *fix* everything.

Basically, we have a pi$$ing contest between FireFox and IE. Well, if it comes to it, I'll design my page for IE and screw FireFox if it can't comply with w3c compliance...

Dave

PS Opera doesn't have an issue with the code <object only, with class id stuff), nor does Safari. ONLY FireFox. That tells me FireFox is the problem here, not the other way around which is what some posters in this thread have suggested. I'm sick and tired of FireFox users bashing IE and purporting that FireFox is standards compliant when it simply isn't.

Daifne
Moderator

User avatar
 
Posts: 122769
Joined: July 31st, 2005, 9:17 pm
Location: Where the Waters Meet, Wisconsin

Post Posted April 26th, 2008, 9:20 pm

Er, you're arguing people who posted almost two years ago? Did you bother to look at the age of this topic?
“If you make people think they're thinking, they'll love you; but if you really make them think, they'll hate you.” ― Harlan Ellison
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.

the-edmeister

User avatar
 
Posts: 31167
Joined: February 25th, 2003, 12:51 am
Location: Chicago, IL, USA

Post Posted April 26th, 2008, 10:03 pm

Daifne wrote:you're arguing people who posted almost two years ago?
At least he won't lose the argument, unless he has multiple personalities.
A mind is a terrible thing to waste. Mine has wandered off and I'm out looking for it.

Guest
Guest
 

Post Posted April 27th, 2008, 6:03 am

Yes, I noticed it was 2 or so years old - the post was relevant to my issue, and I did not think that starting a new topical thread was going to be helpful.

You've both acted like smartasses and avoided answering my question by the way.

I'm sick and tired of FireFox fans acting as if it's the godgiven gift to browsers - it isn't (but then, neither is IE either).

Dave

trolly
Moderator

User avatar
 
Posts: 39243
Joined: August 22nd, 2005, 7:25 am

Post Posted April 27th, 2008, 6:29 am

That would only work if IE ignores the data field. Does IE?
But because IE8 is dropping ActiveX support - at least with the default settings - it will resolve itself soon.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.

Guest
Guest
 

Post Posted May 7th, 2008, 4:26 pm

Why using <object> instead of <embed>?

Just because W3C...

What about XHTML failure? HTML 5 is announced with some deprecated tags as <iframe>

Who knows if they change their mind again making the same with <embed> while you are now wasting your life to complain with "standards" (That no browser observes correctly).

Dartman
Moderator

User avatar
 
Posts: 11964
Joined: February 9th, 2006, 9:43 pm

Post Posted May 7th, 2008, 5:13 pm

I think it's pointless to keep dragging up a nearly two year old thread.

Locked
Alcohol and Calculus don't mix. Never drink and derive.

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 11 guests