// This example is set to evaluate half a second pause (500)
if (Number(getTimer()-lastClick)<500) {
// Add your doubleclick actions here
if (Reaction._visible eq false) {
setProperty ("Reaction", _visible, True);
} else {
setProperty ("Reaction", _visible, False);
}
} else {
lastClick = getTimer();
// Add single click actions here
}
This is a double-click detector… I was just wondering, since I’ve never seen lastClick, is there such a thing as lastMove?
I’m thinking of using onClipEvent (MouseMove) with a x and y detection timer, or could the one above have some hope?
well you shouldnt have seen lastClick because its set in that script there it doesnt exist outside of that - its not like something in Flash that can be checked. lastClick there is manually assigned whenever you click there after the else.
You can do something similar with mouseMove easily enough
this.onMouseMove = function(){
var currentMouseMove = getTimer();
if (currentMouseMove - this.lastMouseMove > 1000){
trace("At least 1 second has passed since you moved the mouse");
}else{
trace("You're a swift mouse-mover!");
}
this.lastMouseMove = currentMouseMove;
};