PDA

View Full Version : Mouse event


travegre
09-26-2005, 11:52 AM
Hi

I would like to perform some action repeatedly while I press some button and hold it pressed. With onRelease event some action is triggered once, but I would like for this action to repeat while I hold mouse pressed. How can I accomplish this?

Thanks for answering

Gregor

finchou
09-26-2005, 11:54 AM
on(press){
pressed=true;
}

on(release){
pressed=false;
}

onClipEvent(enterFrame){
if (pressed==true){
doStuff();
}
}

Scorche
09-26-2005, 05:38 PM
if that doesn't do it, another thing you can do is add an interval on mouse down and clear the interval on mouse up.


cheers