I want to create a swf file to embed on a webpage. I want the swf to play a video at runtime (passed as a parameter). Can this be done ?


I tried this without success in a FLV object

var vid:NetConnection = new NetConnection();
vid.connect(null);
var vidstr:NetStream= NetStream(vid);
vidstr.play("fire.flv");
vFLV.attachVideo(vidstr);

var dur:Number =0;

vidstr.onMetaData = function(oMData:Object ):Void {
dur=oMData.duration;
};