Hiya … I want to make some code that randomly selects functions and when its order has been completed, it then fires off another random function selection again, so I have a continous play automatically generated…>
what I have so far works … anyone else out there has any better ideas?
Why?! because when I export this test to iOS - it collapses and does not work …
var ON:Boolean = true;
var func_ary:Array = [one,two,three,four];
function one():void
{
trace("1");
randomFunction();
}
function two():void
{
trace("2");
randomFunction();
}
function three():void
{
trace("3");
randomFunction();
}
function four():void
{
trace("4");
randomFunction();
}
function randomFunction():void
{
if (ON==true)
{
var rnum:uint = Math.random()*func_ary.length-1;
func_ary[rnum]();
}
}
randomFunction();