?
Solved

How to use the <embed> and <object> tag to incorporate a flash  player

Posted on 2006-11-21
5
Medium Priority
?
567 Views
Last Modified: 2013-11-19
Can someone tell me how I can use the <embed> and <object> tags in order to incorporate a flash player playing my flv and swf files?
Please do not give me urls to online snippets. I need the answer to explain the tags and the attributes in detail.
0
Comment
Question by:alateos
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:davbouchard
ID: 17988940
<object width="550" height="400">
<param name="movie" value="somefilename.swf">
<embed src="somefilename.swf" width="550" height="400"></embed>
</object>

<object width="400" height="40"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com
/pub/shockwave/cabs/flash/swflash.cab#4,0,0,0">
<param name="SRC" value="bookmark.swf">
</object>

Object
The width and height attributes of the object element should match the size of the movie in pixels.

The classid attribute uniquely identifies the player software to use. It must be set to "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B". This unique code identifies an ActiveX control that must be installed on the users PC before the movie can be played. If the user does not have the ActiveX control installed, the browser can automatically download and install it.

The codebase attribute specifies the base path used to resolve relative URIs specified by the classid, data, and archive attributes. When absent, its default value is the base URI of the current document. Note: Internet Explorer uses this attribute to specify a location from where the player can be downloaded. It must be set to "http://www.apple.com/qtactivex/qtplugin.cab". This location will always contain the latest version of the QuickTime player.


Embed
The embed element is added to support browsers that don't support the object element. A browser that understands the object element will ignore the embed element. The object element will be used by new browsers that support ActiveX controls (Internet Explorer 5 and 6). Older browsers (Netscape 4 and 5) will use the embed element.

The width and height attributes of the embed element should match the size of the movie in pixels.

The autoplay and controller attributes of the embed element should be set to the same values as for the parameters in the object element.

The pluginspage attribute defines the players download path. It must be set to "http://www.apple.com/quicktime/download/".



Information taken from http://www.w3schools.com/
http://www.w3schools.com/media/media_quicktime.asp
http://www.w3schools.com/flash/flash_inhtml.asp
0
 

Author Comment

by:alateos
ID: 17989237
so how would you write the above code to play out a file called "test.swf" located on the C:\ drive?
0
 
LVL 6

Expert Comment

by:davbouchard
ID: 18021200
<object width="550" height="400">
<param name="movie" value="C:\test.swf">
<embed src="C:\test.swf" width="550" height="400"></embed>
</object>

And you change the size to what your flash is.
But, if you want that to show on the web then, you'll need to configure IIS or Apache to link to the file.
If it's just for an HTML page on the same computer as the Flash, then there's no problem.
0
 

Author Comment

by:alateos
ID: 18021724
"But, if you want that to show on the web then, you'll need to configure IIS or Apache to link to the file."
Can you please explain further what you mean by that? Maybe an example? Thanks.
0
 
LVL 6

Accepted Solution

by:
davbouchard earned 750 total points
ID: 18029921
Well it depends what server type you're using, if you use one. Is this on a website or just an html file that you'll carry to the play movie.

If it's for a website, it wouldn't be safe to place the file directly in your C: drive, you should put it in a folder. So first put your file in for example C:\FlashMovie.

If you use IIS, Right click your website and select New - > Virtual Folder. Give it a name (If you name it Flash, on your website it will be http://address/Flash/)
Only give Read permissions.

Your object would be like this :

<object width="550" height="400">
<param name="movie" value="http://address/Flash/test.swf">
<embed src="http://address/Flash/test.swf" width="550" height="400"></embed>
</object>
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question