Solved

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

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

813 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now