eemceebee
eemceebee

Reputation: 2666

Mouse Event in Actionscript2?

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 ?

Upvotes: 0

Views: 3394

Answers (2)

Ralph Canapa
Ralph Canapa

Reputation: 640

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

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

Upvotes: 1

eemceebee
eemceebee

Reputation: 2666

Ok, fixed it with this

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

Upvotes: 0

Related Questions