fabs Posted May 11, 2009 Report Share Posted May 11, 2009 hi i have tried a object tag example in http://www.w3schools.com/tags/tryit.asp?fi...=tryhtml_objectbut there was nothing happend in that example browser.is there something wrong??? Link to comment Share on other sites More sharing options...
Skemcin Posted May 11, 2009 Report Share Posted May 11, 2009 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 More sharing options...
fabs Posted May 11, 2009 Author Report Share Posted May 11, 2009 (edited) 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 May 11, 2009 by fabs Link to comment Share on other sites More sharing options...
Skemcin Posted May 11, 2009 Report Share Posted May 11, 2009 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 More sharing options...
Ingolme Posted May 11, 2009 Report Share Posted May 11, 2009 (edited) 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 May 11, 2009 by Ingolme Link to comment Share on other sites More sharing options...
thescientist Posted May 11, 2009 Report Share Posted May 11, 2009 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 More sharing options...
Ingolme Posted May 11, 2009 Report Share Posted May 11, 2009 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 More sharing options...
thescientist Posted May 11, 2009 Report Share Posted May 11, 2009 word. thanks! Link to comment Share on other sites More sharing options...
fabs Posted May 17, 2009 Author Report Share Posted May 17, 2009 Just change the youtube URLs for the path to your Flash file. That is the code for Flash videos, since Youtube works on Flash.how to change it?? Link to comment Share on other sites More sharing options...
Ingolme Posted May 17, 2009 Report Share Posted May 17, 2009 how to change it?? Select the youtube URL by dragging the mouse over the text. Press "delete" on your keyboard. Type in the path to your Flash file where the URL was. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now