Coder Profile - Show off your skills, get a coder profile.
 
 
 
Embed flash into your website
Web Development
Flash is becoming a huge thing now adays, and if you don't have the flash plugin to your browser, then you should! A lot of sites use it and require you to have it in order to even view the site.

So, how would you go about embedding a flash video or object into your website so that all the different web browsers could see and use it? It's rather simple, just copy and paste the code into your site below and replace all the necessary options with your file, and vua-lah!

Note, you need to update both the object params and the embed params for it to work in all browsers!
CODE: Copy / Restore  ::  Remove Scroll Bars
  1. <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0&q uot; id="YourFileName" align="middle" width="500" height="350">
  2.        <param name="allowScriptAccess" value="sameDomain" />
  3.        <param name="movie" value="YourFile.swf" />
  4.        <param name="quality" value="high" />
  5.        <param name="bgcolor" value="#FFFFFF" />
  6.        <embed src="YourFile.swf" quality="high" width="500" height="350" bgcolor="#FFFFFF" name="YourFileName" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
  7. </object>
Note that Mozilla Firefox requires that you have the embed tag in there in order for it to work. To date, I think it is the only browser which requires this to work, all others just use the object tag to play it.
Also, 500 x 350 is the standard width and height for flash videos. This does not mean that yours will be the same. Adjust accordingly.


Posted By Izzmo
Please login to rate coding articles.

Click here to register a free account with us.
Comments
Please login to post comments.
 
Cryzabey     Posted 282 Days Ago
 
 
While the code you've posted is the one used on 99.9% of websites that display
flash content, and the method that's promoted by adobe, it's not supported
by standards. However, a method was proposed called the "Flash Satay" in an
article titled "Flash Satay: Embedding Flash While Supporting Standards" by
Drew McLellan. It is a very informative article, easily Googled, that boils down to
the following code:

<object type="application/x-shockwave-flash"
data="c.swf?path=movie.swf"
width="400" height="300">
<param name="movie"
value="c.swf?path=movie.swf" />
</object>

And requires some workaround if you want it to stream in IE/Netscape. If
you're interested, that's covered in full detail in the article.

Enjoy,
Danny B.
 
Izzmo     Posted 1.90 Year Ago
 
 
I was actually reading about the SWObject and Adobe's form yesterday. I will
have to incorporate that into this article!
 
VBAssassin     Posted 1.94 Year Ago
 
 
I think you should extend this to include mentioning:
http://blog.deconcept.com/swfobject/

The very good SWFObject javascript class.

It would be a very big chunk of this article.

Kind regards,
Scott
Page 1 of 1
More Articles By This Author
Embed flash into your website
Recently Posted "Web Development" Articles
Website Optimization
How to use Memcache on Windows
PHP Sessions = Member Database Cache
Speed Up Delivery of your JavaScript Libraries
A cool tool ^^
AJAX - When to use it?
Introduction To PHP
[PHP] XML
HTML vs XHTML
[PHP] XML: HTML DOM Basics
Recently Rated "Web Development" Articles
Embed flash into your website
PHP Sessions = Member Database Cache
What makes a good PHP programmer?
Website Optimization
Preventing raw PHP leaks on Apache
How to use Memcache on Windows
When to use OOP in PHP
AJAX - When to use it?
Speed Up Delivery of your JavaScript Libraries
[PHP] XML
source codes Categories articles
Browse All
Business & E-Commerce (1)
Databases (1)
Design & Creativity (2)
Hardware (1)
Internet & Web Sites (3)
Life In General (2)
Networking (1)
Operating Systems (5)
Other (2)
Programming (47)
Security (10)
Software Development (5)
Web Development (15)
search Search Inside
Web Development
 
 
Latest News About Coder Profile
Coder Profile Poll
If you made money from keeping your profile up to date, say $30 and up, per month. What extra time would you spend on your profile?

No extra time
A few hours at weekends
A whole day each week
Every minute i can get free


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
1.28 Year Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2010, Scott Thompson, All Rights Reserved