home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Puzzle / HexiomConnect.swf / scripts / mx / core / SpriteAsset.as < prev    next >
Text File  |  2008-08-29  |  1KB  |  54 lines

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