I try to add an 开发者_Python百科event handler to a sprite object but it doesn't affect anyway what is my problem?
... my_sprite_object.addEventListener(MouseEvent.CLICK, handleEvent); addChild(my_sprite_object); ... public function handleEvent(event:MouseEvent):void { //do some stuff here }
Sultan
Have you set the Sprite.buttonMode to true?
If yes, can it be that something else is already capturing the click event and is not letting it bubble further?
精彩评论