mouse events actionscript 2

11 posts

Flag Post

This is crazy but I don’t know the mouse codes for actionscript 2, like when I want to check if ((the mouse is being clicked) and this == true)
but I don’t know the code for mouse clicks and can’t seem to find it anywhere by searching.
all I find is as3.

 
Flag Post

_root.onMouseDown = function() {
trace(“mouse down”);
};

 
Flag Post

Also, for MCs

onClipEvent (mouseDown) {
trace(“mouse down”);
}

 
Flag Post
this.onEnterFrame = function(){
if(Key.isDown(1)){
trace("left mouse click");
}
if(Key.isDown(2)){
trace("right mouse click");
}
}
 
Flag Post

Thank you SO MUCH skyboy! That is a LIFESAVER. All the stuff on Google only covered event listeners. XD
Thank you!

 
Flag Post

 
Flag Post

Lol.

 
Flag Post
Originally posted by skyboy:
this.onEnterFrame = function(){
if(Key.isDown(1)){
trace(“left mouse click”);
}
if(Key.isDown(2)){
trace(“right mouse click”);
}
}

i completely agree. thanks to you, i can do what i want now.

 
Flag Post

…well, this has been resurrected twice. Lol.

 
Flag Post
Originally posted by Senekis93:

I guess this image is relevant once more, so I might as well quote it.

 
Flag Post

Therefore this becomes a good thread for me to ask a question: I seem to recall being told once that, when a thread is necro’ed, if nobody replies to the necromancer a mod can remove that post and the thread will fall back to the forum depths where it should have forever rested in peace. But once somebody replies to the necromancer it’s too late. So is there any truth to this legend?