I got a script running that rotates an image depending on where the mouse is in the movie…
[AS]
a = sun._y-_ymouse;
b = sun._x-_xmouse;
angleA = Math.atan2(a, b);
degrees = angleA/(Math.pi/180);
setProperty (“sun”, _rotation, degrees);
[/AS]
I want this movement to ease… maybe using the speed= command? But cant figure out how to do it… I also would like the image to rotate at a slow pace on its own even if the mouse isnt in the movie to follow.
I can post the .fla if you need it.
Thanks a bunch!
These lines to be run onEnterFrame btw. _xmouse and _ymouse are the final positions of the clip, you subtract the current _x or _y position to get the different and 5 is the speed it travels (the higher the number the slower the speed) because it gradually divides by the position which makes it ease.
Lostinbeta…
Thanks for the code…
I tried what you suggested, but it did not make the desired effect. Instead of the rotation being eased, the whole MC follows around my cursor.
Maybe you could look at it for me if you have some time…
Thanks, I appreciate it!
Ok, it looks good and it does what its suppose to except when it gets to a certain point in the rotation. For me, the right side of the image, the sun will stop following the mouse and then spin all the way around in the opposit direction to catch up with it on the other side.
Sounds kinda confusing so I attached the fla…
Is there any way to defeat this?