Looking to create an AS3 air for android app that loops through folders and randomly selects from all the mp3s in a folder and plays one of them. After it is done playing it will go to the next folder and do the same until it has finished playing 50 random quotes.
WHAT I REALLY NEED HELP WITH IS...
Using AS3 how do I select the contents of local folder or sub
folder and put them into an array and randomly choose one
from that array?
If I know how to do that then I can use this for the audio files and later apply this same structure to call 50 random images.
NOTE The loop has to go in this order for a reason I will not explain here.
I included an IMAGE so you can visualize what I am trying to do.
This code gets contents of the folders.
import flash.filesystem.File;
var desktop:File = File.applicationDirectory.resolvePath("TheFilePathYouChoose/Choice");
var files:Array = desktop.getDirectoryListing();
for (var i:uint = 0; i < files.length; i++)
{
trace(files[i].nativePath); // gets the path of the files
trace(files[i].name);// gets the name
}