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 2010, 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.
alpha:Number
[read-write]Implementation
public function get alpha():Number
public function set alpha(value:Number):void
height:Number
[read-write]Implementation
public function get height():Number
public function set height(value:Number):void
localRegistration:Point
[read-write]Implementation
public function get localRegistration():Point
public function set localRegistration(value:Point):void
localRegistrationX:Number
[read-write]Implementation
public function get localRegistrationX():Number
public function set localRegistrationX(value:Number):void
localRegistrationY:Number
[read-write]Implementation
public function get localRegistrationY():Number
public function set localRegistrationY(value:Number):void
registration:Point
[read-write]Implementation
public function get registration():Point
public function set registration(value:Point):void
registrationX:Number
[read-write]Implementation
public function get registrationX():Number
public function set registrationX(value:Number):void
registrationY:Number
[read-write]Implementation
public function get registrationY():Number
public function set registrationY(value:Number):void
rotation:Number
[read-write]Implementation
public function get rotation():Number
public function set rotation(value:Number):void
scale:Number
[read-write]Implementation
public function get scale():Number
public function set scale(value:Number):void
scaleX:Number
[read-write]Implementation
public function get scaleX():Number
public function set scaleX(value:Number):void
scaleY:Number
[read-write]Implementation
public function get scaleY():Number
public function set scaleY(value:Number):void
skewX:Number
[read-write]Implementation
public function get skewX():Number
public function set skewX(value:Number):void
skewX2:Number
[read-write]Implementation
public function get skewX2():Number
public function set skewX2(value:Number):void
skewX2Radians:Number
[read-write]Implementation
public function get skewX2Radians():Number
public function set skewX2Radians(value:Number):void
skewY:Number
[read-write]Implementation
public function get skewY():Number
public function set skewY(value:Number):void
skewY2:Number
[read-write]Implementation
public function get skewY2():Number
public function set skewY2(value:Number):void
skewY2Radians:Number
[read-write]Implementation
public function get skewY2Radians():Number
public function set skewY2Radians(value:Number):void
target:DisplayObject
[read-only]Implementation
public function get target():DisplayObject
width:Number
[read-write]Implementation
public function get width():Number
public function set width(value:Number):void
x:Number
[read-write]Implementation
public function get x():Number
public function set x(value:Number):void
y:Number
[read-write]Implementation
public function get y():Number
public function set y(value:Number):void
public function TweenProxy(target:DisplayObject, ignoreSiblingUpdates:Boolean = false)
Parameters
| target:DisplayObject |
|
| ignoreSiblingUpdates:Boolean (default = false )
|
public function calibrate():void
public static function create(target:DisplayObject, allowRecycle:Boolean = true):TweenProxy
Parameters
| target:DisplayObject |
|
| allowRecycle:Boolean (default = true )
|
Returns
public function destroy():void
public function getCenter():Point
Returns