Flash Video - Dynamic publishing with javascript

To use this technique, you need to download SWFObject 2 and link to it before the <head> tag.

SWFObject 2.0

UFO and SWFObject have merged into SWFObject 2. It's officially out and aims to be the ultimate in embedding flash content. After you've read the documentation and different implementation possibilities, you may want to start with the online code generator or download the zip from Google code for offline use.

Get the Flash Player to see this movie.

The code

<script type="text/javascript" src="swfobject.js"></script>
<div id="player">
<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this movie.
</div>
<script type="text/javascript">
  var s = new SWFObject("flash/flvplayer.swf","flash/movie_file.flv","320","240","9");
  s.addParam("allowfullscreen","true");
  s.addVariable("file","flash/movie_file_flv");
  s.addVariable("displayheight","225");
  s.addVariable("backcolor","0x111111");
  s.addVariable("frontcolor","0xdddddd");
  s.addVariable("lightcolor","0x99cc00");
  s.addVariable("width","320");
  s.addVariable("height","240");
  s.write("player");
</script>

Read on: Flash video with an XML playlist

Discuss

Tweets Collection