Timer event with extra params

When using the timer , with timer event…


var my_timer:Timer = new Timer(1500, 1);
my_timer.addEventListener(TimerEvent.TIMER,  dispatch );


function dispatch( event:TimerEvent){

}

how do i pass in extra parameters???

Gotta make your own event that extends the timerevent.

[QUOTE=sekasi;2358920]Gotta make your own event that extends the timerevent.[/QUOTE]

You’d have to make you’re own class to dispatch it as well. You might be able to get away with a Timer subclass which overrides dispatchEvent. If for some reason that doesn’t work, you’ll need to compose a timer instance into a subclass of EventDispatcher and listen for those events to have your subclass dispatch its own event.

No, that’s not true. You can make your own events that can pass parameters. I wasn’t quite sure about the Timer however, but listen to Senocular the ubiquitous AS evangelist :sen:

:smiley: