API Documentation | All Packages | All Classes | Index | Frames No Frames |
Class TransformAroundPointPlugin

Package | com.greensock.plugins
Class | public class TransformAroundPointPlugin
Inheritance | TransformAroundPointPlugin TweenPlugin
Subclasses | TransformAroundCenterPlugin

Normally, all transformations (scale, rotation, and position) are based on the DisplayObject's registration point (most often its upper left corner), but TransformAroundPoint allows you to define ANY point around which 2D transformations will occur during the tween. For example, you may have a dynamically-loaded image that you want to scale from its center or rotate around a particular point on the stage.
If you define an x or y value in the transformAroundPoint object, it will correspond to the custom registration point which makes it easy to position (as opposed to having to figure out where the original registration point should tween to). If you prefer to define the x/y in relation to the original registration point, do so outside the transformAroundPoint object, like:
`TweenLite.to(mc, 3, {x:50, y:40, transformAroundPoint:{point:new Point(200, 300), scale:0.5, rotation:30}});
` To define the `point` according to the target's local coordinates (as though it is inside the target), simply pass `pointIsLocal:true` in the transformAroundPoint object, like:
`TweenLite.to(mc, 3, {transformAroundPoint:{point:new Point(200, 300), pointIsLocal:true, scale:0.5, rotation:30}});
` TransformAroundPointPlugin is a Club GreenSock membership benefit. You must have a valid membership to use this class without violating the terms of use. Visit http://www.greensock.com/club/ to sign up or get more details.
USAGE:
`import com.greensock.TweenLite;
import com.greensock.plugins.TweenPlugin;
import com.greensock.plugins.TransformAroundPointPlugin;
TweenPlugin.activate([TransformAroundPointPlugin]); //activation is permanent in the SWF, so this line only needs to be run once.
TweenLite.to(mc, 1, {transformAroundPoint:{point:new Point(100, 300), scaleX:2, scaleY:1.5, rotation:150}});
` Copyright 2011, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined by
--- | --- | ---
|  | changeFactor : Number | TweenPlugin

Public Constants
Hide Inherited Public Constants
Show Inherited Public Constants

| Constant | Defined by
--- | --- | ---
|  | VERSION : Number = 1.4 [static] | TweenPlugin