0 Replies Latest reply on Aug 3, 2010 1:43 PM by CrimsonBruin

    Rotation around an arbitrary axis in Flex


      I am hoping to animate the rotation of an object around an arbitrary axis.  Is it possible to do this with the animation classes in Flex 4?  I can get it to work using the Rotate3D function, but only around the x-, y- or z-axis.  I'll explain...  I have objects that are subclasses of FilledElements, because I need them to be filled with bitmaps.  These elements are created using drawPath, because they can be any type of polygon in the xy plane.  I need to be able to "flip" an object, using any one of its sides as an axis.  The "flip" is a 3D rotation.  The flip works for a rectangle whose width is parallel to the x-axis or length is parallel to the y-axis.  But, if I have a triangle or other polygon whose sides are not parallel to any axes? How can I generate a 3D rotation on one of its sides?


      I tried setting different values using SimpleMotionPath on the transform property.  I tried using the animation class, but it needs a property, and I'm not sure what property maps to what I need.  I thought changing the transform property using SimpleMotionPath might work, but that doesn't do it.  I have tried using matrix.appendRotation on the object, but I'm not sure how to animate using that function.


      Thanks!  Any help would be appreciated.