home *** CD-ROM | disk | FTP | other *** search
- package qs.controls
- {
- import flash.display.DisplayObject;
- import flash.geom.Matrix;
- import mx.core.IFlexDisplayObject;
-
- public class LayoutTarget
- {
- private var _capturedValues:LayoutTarget;
-
- public var scaleX:Number = 1;
-
- public var scaleY:Number = 1;
-
- public var state:String = "added";
-
- public var unscaledWidth:Number = 0;
-
- public var initializeFunction:Function;
-
- public var item:IFlexDisplayObject;
-
- public var alpha:Number = 1;
-
- public var animate:Boolean = true;
-
- public var priority:int = 0;
-
- public var x:Number = 0;
-
- public var y:Number = 0;
-
- public var unscaledHeight:Number = 0;
-
- public var releaseFunction:Function;
-
- public function LayoutTarget(param1:IFlexDisplayObject)
- {
- super();
- this.item = param1;
- }
-
- public function release() : void
- {
- this.unscaledHeight = this.item.height;
- this.unscaledWidth = this.item.width;
- this.x = this.item.x;
- this.y = this.item.y;
- var _loc1_:Matrix = DisplayObject(this.item).transform.matrix;
- this.scaleX = _loc1_.a;
- this.scaleY = _loc1_.d;
- this.item.setActualSize(this._capturedValues.unscaledWidth,this._capturedValues.unscaledHeight);
- this.item.move(this._capturedValues.x,this._capturedValues.y);
- _loc1_ = DisplayObject(this.item).transform.matrix;
- _loc1_.a = this._capturedValues.scaleX;
- _loc1_.d = this._capturedValues.scaleY;
- DisplayObject(this.item).transform.matrix = _loc1_;
- }
-
- public function capture() : void
- {
- if(this._capturedValues == null)
- {
- this._capturedValues = new LayoutTarget(this.item);
- }
- this._capturedValues.unscaledHeight = this.item.height;
- this._capturedValues.unscaledWidth = this.item.width;
- this._capturedValues.x = this.item.x;
- this._capturedValues.y = this.item.y;
- var _loc1_:Matrix = DisplayObject(this.item).transform.matrix;
- this._capturedValues.scaleX = _loc1_.a;
- this._capturedValues.scaleY = _loc1_.d;
- }
- }
- }
-
-