Question
Random FlV
Hi:
I'm trying to randomly load a set of 10 short videos. I have an instance of FLVplayback on the stage named my_video. Here is the script I used, which loads the first video randomly. However, after the first video finished, no other video is loaded.
var VideoArray = new Array();
VideoArray = ["Q1.flv", "Q2.flv", ......"Q10.flv"];
var currentVideo =random(9);
my_video.play(VideoArray[currentVideo]);
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
VideoArray = random (9)
};
my_video.addEventListener("complete", listenerObject);
QUESTIONS:
1. How to randomly load FLV's?
2. How to make the loaded videos not play automatically?
Thanks for your help.
German
Please check my script and suggest ways to make it work.
I'm trying to randomly load a set of 10 short videos. I have an instance of FLVplayback on the stage named my_video. Here is the script I used, which loads the first video randomly. However, after the first video finished, no other video is loaded.
var VideoArray = new Array();
VideoArray = ["Q1.flv", "Q2.flv", ......"Q10.flv"];
var currentVideo =random(9);
my_video.play(VideoArray[currentVideo]);
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
VideoArray = random (9)
};
my_video.addEventListener("complete", listenerObject);
QUESTIONS:
1. How to randomly load FLV's?
2. How to make the loaded videos not play automatically?
Thanks for your help.
German
Please check my script and suggest ways to make it work.