Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-11-21
5
Medium Priority
?
558 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

636 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