Categories

How to embed flash movie into HTML page (flashObject)

Chris Diaz June 27, 2011
Rating: 5.0/5. From 1 vote.
Please wait...

This tutorial will show you how to embed the flash (SWF) movie into your html page.

  • Download the FlashObject script package here:  http://blog.deconcept.com/flashobject/
  • Extract the files from the downloaded zip archive
  • Upload the flashobject.js file to your website scripts directory
  • Into your html page add the following code:
<div  id="head">
<a href="http://www.adobe.com/go/EN_US-H-GET-FLASH"><img src="http://www.adobe.com/images/shared/download_buttons/get_adobe_flash_player.png" alt="" /></a>
</div>

This is an alternative text that would be visible for the visitors who don’t have flash player installed.

Then embed your SWF movie:

<script  type="text/javascript">
var fo = new FlashObject("flash/menu_v8.swf?button=1", "head", "100%", "135", "7", "");
fo.addParam("quality", "high");
fo.write("head");
</script>

You may need to modify the second line:  

  var fo =  new FlashObject("flash/menu_v8.swf?button=1", "head",  "100%", "135", "7", "");
where:
  • swf – The file path and name to your swf file.
  • id – The ID of your object or embed tag. The embed tag will also have this value set as it’s name attribute for files that take advantage of swliveconnect.
  • width – The width of your Flash movie.
  • height – The height of your Flash movie.
  • version – The required player version for your Flash content. This can be a string in the format of ‘majorVersion.minorVersion.revision’. An example would be: "6.0.65". Or you can just require the major version, such as "6".
  • background color – This is the hex value of the background color of your Flash movie.

You may check more detailed documentation here:  http://blog.deconcept.com/flashobject/

This entry was posted in Working with HTML and tagged embed, flashObject, HTML, swf. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket