home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / Jumper.swf / scripts / mx / core / BitmapAsset.as next >
Encoding:
Text File  |  2008-09-05  |  1.1 KB  |  49 lines

  1. package mx.core
  2. {
  3.    import flash.display.BitmapData;
  4.    
  5.    use namespace mx_internal;
  6.    
  7.    public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject
  8.    {
  9.       
  10.       mx_internal static const VERSION:String = "3.0.0.0";
  11.        
  12.       
  13.       public function BitmapAsset(bitmapData:BitmapData = null, pixelSnapping:String = "auto", smoothing:Boolean = false)
  14.       {
  15.          super(bitmapData,pixelSnapping,smoothing);
  16.       }
  17.       
  18.       public function get measuredWidth() : Number
  19.       {
  20.          if(bitmapData)
  21.          {
  22.             return bitmapData.width;
  23.          }
  24.          return 0;
  25.       }
  26.       
  27.       public function get measuredHeight() : Number
  28.       {
  29.          if(bitmapData)
  30.          {
  31.             return bitmapData.height;
  32.          }
  33.          return 0;
  34.       }
  35.       
  36.       public function setActualSize(newWidth:Number, newHeight:Number) : void
  37.       {
  38.          width = newWidth;
  39.          height = newHeight;
  40.       }
  41.       
  42.       public function move(x:Number, y:Number) : void
  43.       {
  44.          this.x = x;
  45.          this.y = y;
  46.       }
  47.    }
  48. }
  49.