listen to event


i have class extend nothing, possible have class listening events?
i found no way this, unless pass object(like displayobject) constructor.

quote:

public class myclass{
public myclass(){
addeventlistener(event.enter_frame, onenterframe);
}
private function onenterframe(event:event):void{...}
}


thankyou

hi,

you can have class listen events produced other classes, if want own class generate events, need extend eventdispatcher class.

btw, displayobject , it's descendants can produce enterframe event.


More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Qualcuno mi sa dire perchè non va questo protocollo seriale ?

Prezzemolo!

play video