As the title suggests, I am trying to create a function in Actionscript 2 that calls for a value and function but I can't seem to get it to use the function. Here is my code.
function fadeOut(seconds, callBackFunction){
_root.fader.activated = true;
_root.fader.secs = seconds;
if(fader.box._alpha >= 100){
callBackFunction();
trace("This part of the code is being called");
}
}
Then this is how I call the function
function BlankFunction(){
trace("working");
}
_root.fadeOut(5, BlankFunction);
So I get the trace saying "This part of the code is being called" but i'm not getting "Working" from the BlankFunction used as the callback. Is there a possible way to create a function in AS2 that calls for a callback function?