Embeding Flash movies using swfobject

Objective:

To embed Flash movie using swfobject

Skill Set:

javascript, HTML, CSS

Demo:

Embeding Flash movie using swfobject

Steps:

  • Download the swfobject script from here
  • Insert this code within the header tag:
  • <script type=”text/javascript” src=”swfobject.js”></script>
  • <script type=”text/javascript”>
    var flashvars = false;
    var params = {
    base:”http://edselweb.com/flash/flickbook/images/”
    };
    var attributes = {};
    swfobject.embedSWF(“images/flickBookUK.swf”, “myContent”, “353″, “698″, “9.0.0″, “expressInstall.swf”, flashvars, params, attributes);
    </script>
  • A div for alternative content is necessary within the body tag as follow:

<div id=”myContent”>
<h1>Alternative content</h1>
<p><a href=”http://www.adobe.com/go/getflashplayer”><img src=”http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif” alt=”Get Adobe Flash player” /></a></p>
</div>

Follow

Get every new post delivered to your Inbox.