home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Swf / Internet.swf / scripts / __Packages / com / rightactionscript / fcb / components / UIBasicComponent.as < prev   
Encoding:
Text File  |  2010-02-23  |  3.7 KB  |  156 lines

  1. class com.rightactionscript.fcb.components.UIBasicComponent extends MovieClip
  2. {
  3.    var __width;
  4.    var __height;
  5.    var _nOriginalWidth;
  6.    var _nOriginalHeight;
  7.    var mcBoundingBox;
  8.    var onEnterFrame;
  9.    var _mcFrame;
  10.    var _nScaleX = 100;
  11.    var _nScaleY = 100;
  12.    var _aQueue = new Array();
  13.    var clipParameters = {};
  14.    function UIBasicComponent()
  15.    {
  16.       super();
  17.       this.init();
  18.       this.createChildren();
  19.       this.draw();
  20.       this.arrange();
  21.    }
  22.    static function mergeClipParameters(oA, oB)
  23.    {
  24.       for(var _loc2_ in oA)
  25.       {
  26.          oA[_loc2_] = oB[_loc2_];
  27.       }
  28.       return true;
  29.    }
  30.    function set width(nWidth)
  31.    {
  32.       this.setSize(nWidth,null);
  33.    }
  34.    function get width()
  35.    {
  36.       return this.__width;
  37.    }
  38.    function set height(nHeight)
  39.    {
  40.       this.setSize(null,nHeight);
  41.    }
  42.    function get height()
  43.    {
  44.       return this.__height;
  45.    }
  46.    function set scaleX(nScaleX)
  47.    {
  48.       this._nScaleX = nScaleX;
  49.       this._xscale = this._nScaleX;
  50.       this.onScale();
  51.    }
  52.    function set scaleY(nScaleY)
  53.    {
  54.       this._nScaleY = nScaleY;
  55.       this._yscale = this._nScaleY;
  56.       this.onScale();
  57.    }
  58.    function init(bDontHideBoundingBox)
  59.    {
  60.       this.__width = this._width;
  61.       this.__height = this._height;
  62.       this._nOriginalWidth = this._width;
  63.       this._nOriginalHeight = this._height;
  64.       if(!bDontHideBoundingBox)
  65.       {
  66.          this.mcBoundingBox._visible = false;
  67.          this.mcBoundingBox._height = 0;
  68.          this.mcBoundingBox._width = 0;
  69.       }
  70.       this.size();
  71.       mx.events.EventDispatcher.initialize(this);
  72.    }
  73.    function setSize(w, h)
  74.    {
  75.       if(w != undefined && w != null)
  76.       {
  77.          this.__width = w;
  78.       }
  79.       else
  80.       {
  81.          this.__width = this._width;
  82.       }
  83.       if(h != undefined && h != null)
  84.       {
  85.          this.__height = h;
  86.       }
  87.       else
  88.       {
  89.          this.__height = this._height;
  90.       }
  91.       this.size();
  92.    }
  93.    function createChildren()
  94.    {
  95.    }
  96.    function draw()
  97.    {
  98.    }
  99.    function size()
  100.    {
  101.       this._xscale = this._nScaleX;
  102.       this._yscale = this._nScaleY;
  103.    }
  104.    function arrange()
  105.    {
  106.       this._width = this.__width;
  107.       this._height = this.__height;
  108.    }
  109.    function addToQueue(oCall)
  110.    {
  111.       this._aQueue.push(oCall);
  112.       if(this.onEnterFrame == undefined)
  113.       {
  114.          this.onEnterFrame = this.runQueue;
  115.       }
  116.    }
  117.    function runQueue()
  118.    {
  119.       var _loc2_ = this._aQueue.shift();
  120.       _loc2_.method.apply(_loc2_.object,_loc2_.params);
  121.       if(this._aQueue.length == 0)
  122.       {
  123.          delete this.onEnterFrame;
  124.       }
  125.    }
  126.    function drawFrame()
  127.    {
  128.       if(this._mcFrame == undefined)
  129.       {
  130.          this.createEmptyMovieClip("_mcFrame",this.getNextHighestDepth());
  131.       }
  132.       var _loc2_ = 1;
  133.       this._mcFrame.clear();
  134.       this._mcFrame.lineStyle(_loc2_,7305079,100);
  135.       this._mcFrame.lineTo(this.__width,0);
  136.       this._mcFrame.lineStyle(_loc2_,9542041,100);
  137.       this._mcFrame.lineTo(this.__width,this.__height);
  138.       this._mcFrame.lineStyle(_loc2_,14015965,100);
  139.       this._mcFrame.lineTo(0,this.__height);
  140.       this._mcFrame.lineStyle(_loc2_,9542041,100);
  141.       this._mcFrame.lineTo(0,0);
  142.       this._mcFrame.moveTo(1,1);
  143.       this._mcFrame.lineStyle(_loc2_,13290700,100);
  144.       this._mcFrame.lineTo(this.__width - 1,1);
  145.       this._mcFrame.lineStyle(_loc2_,14015965,100);
  146.       this._mcFrame.lineTo(this.__width - 1,this.__height - 1);
  147.       this._mcFrame.lineStyle(_loc2_,15658734,100);
  148.       this._mcFrame.lineTo(1,this.__height - 1);
  149.       this._mcFrame.lineStyle(_loc2_,14015965,100);
  150.       this._mcFrame.lineTo(1,1);
  151.    }
  152.    function onScale()
  153.    {
  154.    }
  155. }
  156.