Be a Supporter!

Detecting mouse click?

  • 234 Views
  • 1 Reply
New Topic Respond to this Topic
matrix5565
matrix5565
  • Member since: Feb. 28, 2006
  • Offline.
Forum Stats
Member
Level 16
Game Developer
Detecting mouse click? 2009-02-12 09:54:42 Reply

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.
Forum Stats
Member
Level 46
Blank Slate
Response to Detecting mouse click? 2009-02-12 10:21:24 Reply

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.


- - Flash - Music - Images - -

BBS Signature