FLASH MX 2004 - AS2.0
I have a function with 4 necessary arguments (aka parameters) in order to perform the actions. I would like to have the ability to pass the same function to itself as an argument (sort of like a recursive function) along with its arguments. Basically I want to “base” to engage an onMotionFinished event handler if there is another function passed as an argument. Something like…
function base (arg1, arg2, arg3 arg4, {arg5:another function, arg6:arg5's arg).....}){
//do the stuff
instructions = blahblahblah
if (arg5 is present){
instructions.onEventHandler = function(){
//perform function which is arg5...argN
}
}
}
Would there be a way to use listeners to do this or the AsBroadcaster? Thanks