onClipEvent (mouseMove) { x = this._xmouse; y = this._ymouse*-1; angle = Math.atan(y/x)/(Math.PI/180); if (x<0) { angle += 180; } if (x>=0 && y<0) { angle += 360; } _root.angletext.text = angle; _root.arrow._rotation = (angle*-1) + 90 } Creating an animation of an object rotating is very easy to do, whether you do it with tweens or in Actionscript. Unfortunately, sometimes the rotations don't occur exactly how you would want them to, because by default, the anchor for the rotation is the center point of the object being rotated. In this tutorial, you will learn how to change that anchor point for both tweened animations and Actionscript animations.
|
| ww__w._j_a_va_2___s___.co_m_ | Contact Us |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |