Jump to content

<object> Tag


fabs
 Share

Recommended Posts

Try editing in the <embed> tag into that example.Or, if you go to youtube.com you can copy-n-paste code from any video to see how it works.For instance, goto

and on the right hand side you will see the word "embed". Copy-n-paste the code into the TryIt Editor and you should be set.
Link to comment
Share on other sites

why the <embed> tag in that youtube video is begin by <object> tag??i have tried to erase that <object> tag .and the the video is still could be displayed.so it means that , theres no need to add <object> tag before <embed> tag, right????????

Edited by fabs
Link to comment
Share on other sites

Some browsers need/use the <object> tag and other need/use the <embed> tag. The <embed> tag should be nested inside the <object> tag.Do you have a sample of the code that is not working? Copy-n-paste it here, or what is more helpful is to paste a URL where it can be seen - so all the source code can be reviewed.

Link to comment
Share on other sites

The object tag works for all browsers. <embed> is not part of the HTML standard.An <object> tag with classid and codebase won't work in standard compliant browsers, but will work in Internet Explorer.So to solve this, we put an object tag without those attributes and put another object tag with them.For a youtube video, you only need one object tag, because Internet Explorer doesn't need a classid or codebase for Flash. This example should work in all browsers:

<object type="application/x-shockwave-flash" width="500" height="500" data="http:[rest of URL here]">  <param name="movie" value="http:[rest of URL here]">  <param name="allowFullScreen" value="true">  <param name="allowscriptaccess" value="always"></object>

Edited by Ingolme
Link to comment
Share on other sites

The object tag works for all browsers. <embed> is not part of the HTML standard.An <object> tag with classid and codebase won't work in standard compliant browsers, but will work in Internet Explorer.So to solve this, we put an object tag without those attributes and put another object tag with them.For a youtube video, you only need one object tag, because Internet Explorer doesn't need a classid or codebase for Flash. This example should work in all browsers:
<object type="application/x-shockwave-flash" width="500" height="500" data="http:[rest of URL here]">  <param name="movie" value="http:[rest of URL here]">  <param name="allowFullScreen" value="true">  <param name="allowscriptaccess" value="always"></object>

how would the code look for a flash video?
Link to comment
Share on other sites

how would the code look for a flash video?
Just change the youtube URLs for the path to your Flash file. That is the code for Flash videos, since Youtube works on Flash.
Link to comment
Share on other sites

how to change it??
  1. Select the youtube URL by dragging the mouse over the text.
  2. Press "delete" on your keyboard.
  3. Type in the path to your Flash file where the URL was.

Link to comment
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
 Share

×
×
  • Create New...