EMBED tag Phased out
-
- Posts: 1
- Joined: July 11th, 2006, 9:29 am
EMBED tag Phased out
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
Thank you, Dan
- trolly
- Moderator
- Posts: 39851
- Joined: August 22nd, 2005, 7:25 am
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.
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
The embed tag was never part of any w3c recommendation. If you really want your page to validate, use this:
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.
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
- Posts: 14455
- Joined: November 27th, 2003, 4:50 am
- Location: Warwickshire, UK
- Contact:
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: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.
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>
"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
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
-
- Guest
true, but...
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.
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.
- the-edmeister
- Posts: 32249
- Joined: February 25th, 2003, 12:51 am
- Location: Chicago, IL, USA
-
- Guest
Wow!
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
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
- Posts: 39851
- Joined: August 22nd, 2005, 7:25 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.
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.
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
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).
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).