that still wont work because you are dispatching the event before you bind the function as the handler.

what are you trying to achieve (apart from getting the event to fire), i know this is just an example, but it seems a bit strange.

anyway, you cant call init in the constructor to dispatch the event, because theres no method to handle the event.

you could take out the call to init from the constructor and call it seperately, then it should work :

var eventry:EventTry=new EventTry();
eventry.onEvent=function(){
     trace(""onEvent fired"");
}

eventry.init();


martin.

Javier Tello wrote:
Still doesn't work. If you look at the code the class fired the event before deleting itself. Anyway I simplify it without the die() method:


--
want to know what i think? probably not

http://relivethefuture.com/choronzon
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to