I am trying to run different functions from the values taken from an array. This is part of a game so that enemies can have different moves, and dirrections.
I was trying to use the script:
arrayName = [“value1”,“value2”,value3"];
value1 = function(){
//code here
};
value2 = function(){
//code here
};
value3 = fucntion(){
//code here
};
arrayNamerandom(2);
But this doesnt do anything, dont think flash allows variables to be used to run functions.
If any one knows how I can do this with out a list of if commands, I want to be able to use a long array.
thank you