home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Multimedija / shufflr.air / ShufflrClient.swf / scripts / mx / core / SpriteAsset.as < prev    next >
Encoding:
Text File  |  2010-06-23  |  1.3 KB  |  53 lines

  1. package mx.core
  2. {
  3.    use namespace mx_internal;
  4.    
  5.    public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject, IBorder
  6.    {
  7.       mx_internal static const VERSION:String = "3.5.0.12683";
  8.       
  9.       private var _measuredHeight:Number;
  10.       
  11.       private var _measuredWidth:Number;
  12.       
  13.       public function SpriteAsset()
  14.       {
  15.          super();
  16.          _measuredWidth = width;
  17.          _measuredHeight = height;
  18.       }
  19.       
  20.       public function get measuredWidth() : Number
  21.       {
  22.          return _measuredWidth;
  23.       }
  24.       
  25.       public function get measuredHeight() : Number
  26.       {
  27.          return _measuredHeight;
  28.       }
  29.       
  30.       public function setActualSize(param1:Number, param2:Number) : void
  31.       {
  32.          width = param1;
  33.          height = param2;
  34.       }
  35.       
  36.       public function move(param1:Number, param2:Number) : void
  37.       {
  38.          this.x = param1;
  39.          this.y = param2;
  40.       }
  41.       
  42.       public function get borderMetrics() : EdgeMetrics
  43.       {
  44.          if(scale9Grid == null)
  45.          {
  46.             return EdgeMetrics.EMPTY;
  47.          }
  48.          return new EdgeMetrics(scale9Grid.left,scale9Grid.top,Math.ceil(measuredWidth - scale9Grid.right),Math.ceil(measuredHeight - scale9Grid.bottom));
  49.       }
  50.    }
  51. }
  52.  
  53.