0

I have a problem getting mouse events in Flash Actionscript 2.

Here is what I have so far :

var _mouseListener:Object = new Object();
_mouseListener.onMouseClick = Delegate.create(this, Mouse_Event);   
Mouse.addListener(_mouseListener);


private function Mouse_Event():Void
{
 trace("Mouse_Event mouse handled");
}

I have the same setup for the key handling and there it works, but not for the mouse.

Any idea ?

2 Answers 2

1

To avoid using "_level0" notation I've recently used:

this.onMouseDown = Delegate.create(this, onMouseDown_Event);

Sign up to request clarification or add additional context in comments.

Comments

0

Ok, fixed it with this

_level0.onMouseUp =  Delegate.create(this, onMouse_Event);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.