Solved

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

Posted on 2006-11-21
5
538 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
Comment Utility
<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
Comment Utility
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
Comment Utility
<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
Comment Utility
"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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 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