Forum Moderators: open
Been fumbling my way through Flash and I am trying to do some dynamic animations.
I have an event listener added and it calls a function. Adding the event listener passes the event to the function automatically but what if i want to pass additional information to it?
So this:
addEventListener(Event.ENTER_FRAME, doEveryFrame);
Becomes this
addEventListener(Event.ENTER_FRAME, doEveryFrame(extra_var_passed));
function doEveryFrame(event:Event, extra_var_passed:Number):void {
//code here
}
I have tried but this either isn't possible or my syntax is whack