I am creating a rotating menu. This is the code in each one of the 4 buttons inside the menu.

PHP Code:
onClipEvent(load){
    
y=0;
    
speedR=5;
    
radius=100;
    
xcenter=393/2;
    
ycenter=325/2;
    
zcenter=100;
    
angle=0;
    
fl=150;
    }

    
onClipEvent(enterFrame){
    
_x=Math.cos(angle*Math.PI/180)*radius+xcenter;
    
_y=y+ycenter;
    
z=Math.sin(angle*Math.PI/180)*radius+zcenter;
    
scale=fl/(fl+z);
    
_xscale_yscale scale*100;
    
angle+=speedR;
    if(
angle>359){
    
angle-=360;
    }

    } 
How can I add a mouse event in which slows down the speed of the button or stop the menu of moving??

Thank you