Detecting mouse click?
- matrix5565
-
matrix5565
- Member since: Feb. 28, 2006
- Offline.
-
- Forum Stats
- Member
- Level 16
- Game Developer
I can't for my life figure it out.
The only stuff I can find online looks like:
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
trace('pressed');
};
mouseListener.onMouseUp = function() {
trace('released');
};
Mouse.addListener(mouseListener);
And I'm not sure how that works.
(I apologize, I'm pretty new to ActionScript)
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
That'll work with AS2. Just paste it on a frame in a new fla, publish and click/release the mouse to see the traces.



