Hi,
I know that everybody asked for that kind of question but I still have problem with it. I’m adding clip to the stage with flvplayback component in it with a for loop. I want to replay each video at the end but it always plays the last one only or if I try to target with childByName i have errors. I’m sure it’s pretty easy but I just can’t figure it out.
Here’s my code:
var container:MovieClip = new MovieClip();
addChild(container);
var vidPlayer:vid_mc;
for (var i:Number=0; i<4; i++) {
vidPlayer=new vid_mc();
vidPlayer.x=i*(100+space);
vidPlayer.name="vid"+i;
container.addChild(vidPlayer);
vidPlayer.vid.source="3897623.flv";
vidPlayer.y=0;
vidPlayer.vid.addEventListener("complete",replayVid);
//replay videos
function replayVid(e:Event):void {
trace("Replaying videos");
vidPlayer.vid.seek(0);
vidPlayer.vid.play();
}
}
Thanks for your help.