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

Package | com.greensock
Class | public dynamic class TweenProxy
Inheritance | TweenProxy flash.utils.Proxy

TweenProxy essentially "stands in" for a DisplayObject, adding several tweenable properties as well as the ability to set a custom registration point around which all transformations (like rotation, scale, and skew) occur. In addition to all the standard DisplayObject properties, TweenProxy adds:

- registration : Point
- registrationX : Number
- registrationY : Number
- localRegistration : Point
- localRegistrationX : Number
- localRegistrationY : Number
- skewX : Number
- skewY : Number
- skewX2 : Number
- skewY2 : Number
- scale : Number

Tween the skewX and/or skewY for normal skews (which visually adjust scale to compensate), or skewX2 and/or skewY2 in order to skew without visually adjusting scale. Either way, the actual scaleX/scaleY/scaleZ values are not altered as far as the proxy is concerned.
The `registration` point is based on the DisplayObject's parent's coordinate space whereas the `localRegistration` corresponds to the DisplayObject's inner coordinates, so it's very simple to define the registration point whichever way you prefer.
Once you create a TweenProxy, it is best to always control your DisplayObject's properties through the TweenProxy so that the values don't become out of sync. You can set ANY DisplayObject property through the TweenProxy, and you can call DisplayObject methods as well. If you directly change the properties of the target (without going through the proxy), you'll need to call the calibrate() method on the proxy. It's usually best to create only ONE proxy for each target, but if you create more than one, they will communicate with each other to keep the transformations and registration position in sync (unless you set ignoreSiblingUpdates to true).
EXAMPLE:
To set a custom registration piont of x:100, y:100, and tween the skew of a MovieClip named "my_mc" 30 degrees on the x-axis and scale to half-size over the course of 3 seconds using an Elastic ease, do:
`import com.greensock.TweenProxy;
import com.greensock.easing.Elastic;
import flash.geom.Point;
var myProxy:TweenProxy = TweenProxy.create(my_mc);
myProxy.registration = new Point(100, 100);
TweenLite.to(myProxy, 3, {skewX:30, scale:0.5, ease:Elastic.easeOut});
` 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

| Property | Defined by
--- | --- | ---
|  | alpha : Number | TweenProxy
|  | height : Number | TweenProxy
|  | localRegistration : Point | TweenProxy
|  | localRegistrationX : Number | TweenProxy
|  | localRegistrationY : Number | TweenProxy
|  | registration : Point | TweenProxy
|  | registrationX : Number | TweenProxy
|  | registrationY : Number | TweenProxy
|  | rotation : Number | TweenProxy
|  | scale : Number | TweenProxy
|  | scaleX : Number | TweenProxy
|  | scaleY : Number | TweenProxy
|  | skewX : Number | TweenProxy
|  | skewX2 : Number | TweenProxy
|  | skewX2Radians : Number | TweenProxy
|  | skewY : Number | TweenProxy
|  | skewY2 : Number | TweenProxy
|  | skewY2Radians : Number | TweenProxy
|  | target : DisplayObject [read-only] | TweenProxy
|  | width : Number | TweenProxy
|  | x : Number | TweenProxy
|  | y : Number | TweenProxy

Public Methods

| Method | Defined by
--- | --- | ---
|  | TweenProxy(target:DisplayObject, ignoreSiblingUpdates:Boolean = false) | TweenProxy
|  | calibrate():void | TweenProxy
|  | create(target:DisplayObject, allowRecycle:Boolean = true):TweenProxy [static] | TweenProxy
|  | destroy():void | TweenProxy
|  | getCenter():Point | TweenProxy

Property detail

alpha | property

`alpha:Number` [read-write]Implementation
`public function get alpha():Number`
`public function set alpha(value:Number):void`

height | property |

`height:Number` [read-write]Implementation
`public function get height():Number`
`public function set height(value:Number):void`

localRegistration | property |

`localRegistration:Point` [read-write]Implementation
`public function get localRegistration():Point`
`public function set localRegistration(value:Point):void`

localRegistrationX | property |

`localRegistrationX:Number` [read-write]Implementation
`public function get localRegistrationX():Number`
`public function set localRegistrationX(value:Number):void`

localRegistrationY | property |

`localRegistrationY:Number` [read-write]Implementation
`public function get localRegistrationY():Number`
`public function set localRegistrationY(value:Number):void`

registration | property |

`registration:Point` [read-write]Implementation
`public function get registration():Point`
`public function set registration(value:Point):void`

registrationX | property |

`registrationX:Number` [read-write]Implementation
`public function get registrationX():Number`
`public function set registrationX(value:Number):void`

registrationY | property |

`registrationY:Number` [read-write]Implementation
`public function get registrationY():Number`
`public function set registrationY(value:Number):void`

rotation | property |

`rotation:Number` [read-write]Implementation
`public function get rotation():Number`
`public function set rotation(value:Number):void`

scale | property |

`scale:Number` [read-write]Implementation
`public function get scale():Number`
`public function set scale(value:Number):void`

scaleX | property |

`scaleX:Number` [read-write]Implementation
`public function get scaleX():Number`
`public function set scaleX(value:Number):void`

scaleY | property |

`scaleY:Number` [read-write]Implementation
`public function get scaleY():Number`
`public function set scaleY(value:Number):void`

skewX | property |

`skewX:Number` [read-write]Implementation
`public function get skewX():Number`
`public function set skewX(value:Number):void`

skewX2 | property |

`skewX2:Number` [read-write]Implementation
`public function get skewX2():Number`
`public function set skewX2(value:Number):void`

skewX2Radians | property |

`skewX2Radians:Number` [read-write]Implementation
`public function get skewX2Radians():Number`
`public function set skewX2Radians(value:Number):void`

skewY | property |

`skewY:Number` [read-write]Implementation
`public function get skewY():Number`
`public function set skewY(value:Number):void`

skewY2 | property |

`skewY2:Number` [read-write]Implementation
`public function get skewY2():Number`
`public function set skewY2(value:Number):void`

skewY2Radians | property |

`skewY2Radians:Number` [read-write]Implementation
`public function get skewY2Radians():Number`
`public function set skewY2Radians(value:Number):void`

target | property |

`target:DisplayObject` [read-only]Implementation
`public function get target():DisplayObject`

width | property |

`width:Number` [read-write]Implementation
`public function get width():Number`
`public function set width(value:Number):void`

x | property |

`x:Number` [read-write]Implementation
`public function get x():Number`
`public function set x(value:Number):void`

y | property |

`y:Number` [read-write]Implementation
`public function get y():Number`
`public function set y(value:Number):void`
Constructor detail

TweenProxy | () | constructor

`public function TweenProxy(target:DisplayObject, ignoreSiblingUpdates:Boolean = false)`Parameters

| `target:DisplayObject`
| `ignoreSiblingUpdates:Boolean` (default = `false`)``

Method detail

calibrate | () | method

`public function calibrate():void`

create | () | method |

`public static function create(target:DisplayObject, allowRecycle:Boolean = true):TweenProxy` Parameters

| `target:DisplayObject`
| `allowRecycle:Boolean` (default = `true`)``

Returns

| `TweenProxy`

destroy | () | method |

`public function destroy():void`

getCenter | () | method |

`public function getCenter():Point`

Returns

| `Point`