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
  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.
 
Izzmo     Posted 179 Days Ago
 
 
I was actually reading about the SWObject and Adobe's form yesterday. I will
have to incorporate that into this article!
 
VBAssassin     Posted 191 Days 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
Website Optimization
How to use Memcache on Windows
Preventing raw PHP leaks on Apache
When to use OOP in PHP
AJAX - When to use it?
Speed Up Delivery of your JavaScript Libraries
[PHP] XML
A cool tool ^^
HTML vs XHTML
Introduction To PHP
source codes Categories articles
Browse All
Business & E-Commerce (1)
Databases (1)
Design & Creativity (1)
Internet & Web Sites (1)
Life In General (2)
Operating Systems (3)
Other (2)
Programming (48)
Security (10)
Software Development (5)
Web Development (15)
search Search Inside
Web Development
 
 
Part of the MyPingle Network
Development Blog :: Make A Donation :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents
Version 1.44.00
Copyright © 2007 - 2008, Scott Thompson, All Rights Reserved