Packagecom.greensock
Classpublic dynamic class TweenProxy
InheritanceTweenProxy Inheritance 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:

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.



Public Properties
 PropertyDefined 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
 MethodDefined 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
alphaproperty
alpha:Number  [read-write]Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
heightproperty 
height:Number  [read-write]Implementation
    public function get height():Number
    public function set height(value:Number):void
localRegistrationproperty 
localRegistration:Point  [read-write]Implementation
    public function get localRegistration():Point
    public function set localRegistration(value:Point):void
localRegistrationXproperty 
localRegistrationX:Number  [read-write]Implementation
    public function get localRegistrationX():Number
    public function set localRegistrationX(value:Number):void
localRegistrationYproperty 
localRegistrationY:Number  [read-write]Implementation
    public function get localRegistrationY():Number
    public function set localRegistrationY(value:Number):void
registrationproperty 
registration:Point  [read-write]Implementation
    public function get registration():Point
    public function set registration(value:Point):void
registrationXproperty 
registrationX:Number  [read-write]Implementation
    public function get registrationX():Number
    public function set registrationX(value:Number):void
registrationYproperty 
registrationY:Number  [read-write]Implementation
    public function get registrationY():Number
    public function set registrationY(value:Number):void
rotationproperty 
rotation:Number  [read-write]Implementation
    public function get rotation():Number
    public function set rotation(value:Number):void
scaleproperty 
scale:Number  [read-write]Implementation
    public function get scale():Number
    public function set scale(value:Number):void
scaleXproperty 
scaleX:Number  [read-write]Implementation
    public function get scaleX():Number
    public function set scaleX(value:Number):void
scaleYproperty 
scaleY:Number  [read-write]Implementation
    public function get scaleY():Number
    public function set scaleY(value:Number):void
skewXproperty 
skewX:Number  [read-write]Implementation
    public function get skewX():Number
    public function set skewX(value:Number):void
skewX2property 
skewX2:Number  [read-write]Implementation
    public function get skewX2():Number
    public function set skewX2(value:Number):void
skewX2Radiansproperty 
skewX2Radians:Number  [read-write]Implementation
    public function get skewX2Radians():Number
    public function set skewX2Radians(value:Number):void
skewYproperty 
skewY:Number  [read-write]Implementation
    public function get skewY():Number
    public function set skewY(value:Number):void
skewY2property 
skewY2:Number  [read-write]Implementation
    public function get skewY2():Number
    public function set skewY2(value:Number):void
skewY2Radiansproperty 
skewY2Radians:Number  [read-write]Implementation
    public function get skewY2Radians():Number
    public function set skewY2Radians(value:Number):void
targetproperty 
target:DisplayObject  [read-only]Implementation
    public function get target():DisplayObject
widthproperty 
width:Number  [read-write]Implementation
    public function get width():Number
    public function set width(value:Number):void
xproperty 
x:Number  [read-write]Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
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):TweenProxyParameters
target:DisplayObject
 
allowRecycle:Boolean (default = true)

Returns
TweenProxy
destroy()method 
public function destroy():void
getCenter()method 
public function getCenter():Point

Returns
Point