I dont suppose anyone could quickly help me with a small function?
I am using flash builder 4, using the spark VideoPlayer.
I want to be able to create a function that takes a number of source files, and picks a random one for the player to play.
THen one the application Complete, i want to call a fuction, that wil pick a random video and play it.
THInk anyone could help me with this ?
var files:Array = [ "Video 1", "Video 2", "Video 3" ];
var n:int = files.length; // 3
var i:int = int(n * Math.random()); // 0, 1, or 2 because 0.0 <= random() < 1.0
var fileToPlay:String = files[i];
Adodbe Flex SDK Team