home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Swf / linux.swf / scripts / __Packages / com / rightactionscript / fcb / components / UIBasicComponent.as < prev   
Text File  |  2010-02-24  |  4KB  |  149 lines

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