Hi guys,
I have two flv’s loading externally and play one after another and was wondering how to set (let’s say) a 5 second delay in between.
Here is my code at the minute, thanks in advance.
var video1:VideoPlayer = new VideoPlayer();
container.addChild(video1);
video1.x = Math.random() * 700;
video1.y = Math.random() * 700;
video1.scaleX = Math.random() * 3;
video1.scaleY = Math.random() * 3;
video1.play(“MYVIDEO.flv”);
video1.addEventListener(VideoEvent.COMPLETE, vidEnd);
function vidEnd(evt:VideoEvent):void {
container.removeChild(video1);
var video3:VideoPlayer = new VideoPlayer();
container3.addChild(video3);
video3.scaleX = Math.random() * 3;
video3.scaleY = Math.random() * 3;
video3.x = Math.random() * 700;
video3.y = Math.random() * 700;
video3.play("MYVIDEO_2.flv");
video3.addEventListener(VideoEvent.COMPLETE, vidEnd3);
function vidEnd3(evt:VideoEvent):void {
container3.removeChild(video2);
}