# Rotating object, how to stop on rollover?

**URL:** https://forum.kirupa.com/t/rotating-object-how-to-stop-on-rollover/275163
**Category:** Uncategorized
**Created:** [November 10, 2008, 6:03pm UTC](https://forum.kirupa.com/t/rotating-object-how-to-stop-on-rollover/275163 "2008-11-10T18:03:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![feelliong](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@feelliong](https://forum.kirupa.com/u/feelliong)
#### Post date: [November 10, 2008, 6:03pm UTC](https://forum.kirupa.com/t/rotating-object-how-to-stop-on-rollover/275163/1 "2008-11-10T18:03:55Z")

</div>

im doin some circles rotating like a wheel, script as below,  
but i duno how to make it stop while i mouseover on the circles…  
anyone pls help me? thx thx…

this is the script i put on the circle object:

onClipEvent (load)  
{  
radius = 40;  
degrees = 0;  
}  
onClipEvent (enterFrame)  
{  
angle = degrees \* 0.017453;  
degrees = degrees + 1;  
xposition = radius \* Math.cos(angle);  
yposition = radius \* Math.sin(angle);  
this.\_x = xposition + \_root.center\_cross.\_x;  
this.\_y = yposition + \_root.center\_cross.\_y;  
}

on (release){  
\_root.bg\_color.gotoAndPlay(“red”);  
\_root.gotoAndPlay(“msg”);  
}
