Greetings,
I have come across this problem before, but is it possible to build an array that simply has a list of functions in it and then when I call a section of that array functionList[2] it executes the function?
I am building a button that I want to essentially cycle through functions. I know there are other ways around this, like placing each function on a different keyframe and cycling through frames, but that is a little too Flash 5 for me.
I have been able to execute a function inside the array as follows but I really need to be able to do other things when I call the function inside the array:
myFunctionArray=[do_a_bunch_of_stuff_1 , do_a_bunch_of_stuff_2 , do_a_bunch_of_stuff_3];
bt_next.onPress = myFunctionArray[2];
I need to be able to do something like:
bt_next.onPress = function(){
nextFunction ++
myFunctionArray[nextFunction]
}
Is it possible to call functions from an array? Any help would be greatly appreciated. Thanks!
-i