     {
         var targetX:Number = getCurrentValue("x");
         var targetY:Number = getCurrentValue("y");
-
-        // If somebody else has changed our position
+        var targetRotation:Number = getCurrentValue("rotation");
+
+        // If somebody else has changed the rotation
+        if (Math.abs(targetRotation - lastRotation) > 0.1)
+        {
+            var radValCurr:Number = Math.PI * target.rotation / 180;        
+            originalOffsetX = originX * Math.cos(radValCurr) - 
+                originY * Math.sin(radValCurr);
+            originalOffsetY = originX * Math.sin(radValCurr) + 
+                originY * Math.cos(radValCurr);
+        }
+        
+        // If somebody else has changed the position
         if (Math.abs(newX - targetX) > 0.1)
             centerX = targetX + originalOffsetX;
-        
+
         if (Math.abs(newY - targetY) > 0.1)
             centerY = targetY + originalOffsetY;
-        
+
         var rotateValue:Number = Number(event.value);     
         var radVal:Number = Math.PI * rotateValue / 180;
-                
+
         newX = centerX - originX * Math.cos(radVal) + originY * Math.sin(radVal);
         newY = centerY - originX * Math.sin(radVal) - originY * Math.cos(radVal);
         

     * @private
     */
    private var originalOffsetY:Number;
    
    //--------------------------------------------------------------------------
    //


import mx.effects.PropertyValuesHolder;
import mx.events.AnimationEvent;

//  Let (phi) be angle between r=(Ox,Oy - Cx,Cy) and -X Axis.
//   (theta) be clockwise further angle of rotation.
