private function onGesturePinch(pinchEvent:TransformGestureEvent):void{
this.stopDrag();
setAsCurrentChild();
var pinchMatrix:Matrix = this.transform.matrix;
var pinchPoint:Point = pinchMatrix.transformPoint(new Point((this.width/2),
(this.height/2)));
pinchMatrix.translate(-pinchPoint.x, -pinchPoint.y);
pinchMatrix.scale(pinchEvent.scaleX, pinchEvent.scaleY);
pinchMatrix.translate(pinchPoint.x, pinchPoint.y);
this.transform.matrix = pinchMatrix;
if( (this.transform.pixelBounds.height >
FlexGlobals.topLevelApplication.height) &&
(this.transform.pixelBounds.width > FlexGlobals.topLevelApplication.width) )
{
var itemEvent:ItemClickEvent = new ItemClickEvent(ON_IMAGE_SET);
itemEvent.item = this.source;
this.dispatchEvent(itemEvent);
}
}
private function onGestureRotate(rotateEvent:TransformGestureEvent):void{
this.stopDrag();
setAsCurrentChild();
var rotateMatrix:Matrix = this.transform.matrix;
var rotatePoint:Point =
rotateMatrix.transformPoint(
new Point((this.width/2), (this.height/2)));
rotateMatrix.translate(-rotatePoint.x, -rotatePoint.y);
rotateMatrix.rotate(rotateEvent.rotation*(Math.PI/180));
rotateMatrix.translate(rotatePoint.x, rotatePoint.y);
this.transform.matrix = rotateMatrix ;
}
On 24 September 2012 11:38, Prish goyal <[email protected]> wrote:
> I want to rotate and zomm on touch in andriod
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" 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/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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/android-developers?hl=en