Hi pls try this code,...
DispObj --------> assign the image id to be rotated
value ----------> assign the angle to be rotated.
private function RotateImage(DispObj:DisplayObject,value:int=0):void
{
var q:Number = degree2Radian(value);
Constants.OBJ_IMAGE_COMP.intRotatingValue = value;
var centerX:Number = image.content.width / 2;
var centerY:Number = image.content.height /2;
var m:Matrix = new Matrix();
m.translate(-1 * centerX, -1 * centerY);
m.rotate(q);
m.translate(centerX, centerY);
DispObj.transform.matrix = m;
var t:Transform = new Transform(DispObj);
t.matrix = m;
DispObj.transform = t;
}
--
With Regards
G.Thiyagarajan
Mob - 9750003737
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.