# 360 deg rotation + easing

**URL:** https://forum.kirupa.com/t/360-deg-rotation-easing/53829
**Category:** flash
**Created:** [June 8, 2004, 11:11am UTC](https://forum.kirupa.com/t/360-deg-rotation-easing/53829 "2004-06-08T11:11:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Lobo\_](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@Lobo\_](https://forum.kirupa.com/u/Lobo_)
#### Post date: [June 8, 2004, 11:11am UTC](https://forum.kirupa.com/t/360-deg-rotation-easing/53829/1 "2004-06-08T11:11:56Z")

</div>

Hi,

I have a sequence of pictures (object made in 3dmax) that I put in a MC now I want that this “Object” can be drag/spin on \_X if the user drag him and if not the object is “floating” like in this tutorial ([kirupa.com - Triangular Hourglass and SpaceShip](http://www.kirupa.com/developer/actionscript/hourglass_spaceship.htm)) I want the same thing like in the ship tutorial, any ideas how to achieve this? (coz I don’t need to DRAW the object), someone can post a tutorial or attach a file (plz show me the path).

Thank you for any help!

_Lobo_ :hr:  
ps: I wrote this post in other forum but Im sure this is the right one (sorry :ne: )

I search something like this in the forum but Ican’t find nothing that can be usefull exept:

> [@Ilyas le Pom](#):
>
> Put all your pics inside a clip, one per frame. Then play a frame of that clip according to the mouse position. Something like
> 
> ```auto
> totFrames = yourClip._totalframes ; // I think that it's what it's called
> this.onMouseMove = function () {
> var percentMouse = _ymouse / Stage.width ;
> var frameToPlay = Math.ceil(percentMouse * totFrames) ;
> yourClip.gotoAndStop (frametoPlay) ;
> }
> 
> ```
> 
> You need to put a stop action in the first frame of your clip.
> 
> pom 🙂

[http://www.parallelgraphics.com](http://www.parallelgraphics.com)

====================================================================

myClip.onEnterFrame = function() {  
speed = 18;  
// 360 must be divisible by speed  
//positive rotates CW, negative CCW  
(360%speed == 0) ? speed : speed=null;  
if (angle\>=360 || angle\<=-360) {  
this.onEnterFrame = null;  
} else {  
angle += speed;  
this.\_rotation = angle;  
}  
};

[SIZE=3][COLOR=Red]But Im not sure that this can by apply to my problem?[/COLOR][/SIZE]
