Groups | Blog | Home
all groups > flash actionscript > february 2005 >

flash actionscript : Mouse Hold


GhettoFabFlah
2/3/2005 9:54:37 PM
i have a movieclip that when u click the mouse it goes to the next frame. I was
wondering if there was anyway to have it do the same thing exept when u hold
the mouse button it keeps going. ANY HELP IS APPRECIATED!
mandingo
2/3/2005 11:06:17 PM
set a variable with your mouse...

holdingMouse = false;
myMouse = new Object();
myMouse.onMouseDown = function(){
holdingMouse = true;
}
myMouse.onMouseUp = function(){
holdingMouse = false;
}
Mouse.addListener(myMouse);

then in your actions at the beginning of whatever is animating
if(holdingMouse == true){
nextframe();
}

or something like that anyway... it will give you the idea

cheers,
AddThis Social Bookmark Button