Solved

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

Posted on 2006-11-21
5
554 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 250 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

732 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