home *** CD-ROM | disk | FTP | other *** search
/ Hentai Interactivo 57 / HENTAI57.bin / flip3.swf / scripts / __Packages / mx / core / View.as < prev   
Text File  |  2008-11-04  |  4KB  |  147 lines

  1. class mx.core.View extends mx.core.UIComponent
  2. {
  3.    static var symbolName = "View";
  4.    static var symbolOwner = mx.core.View;
  5.    static var version = "2.0.2.127";
  6.    var className = "View";
  7.    static var childNameBase = "_child";
  8.    var hasBeenLayedOut = false;
  9.    var _loadExternalClass = "UIComponent";
  10.    function View()
  11.    {
  12.       super();
  13.    }
  14.    function init()
  15.    {
  16.       super.init();
  17.       this.tabChildren = true;
  18.       this.tabEnabled = false;
  19.       this.boundingBox_mc._visible = false;
  20.       this.boundingBox_mc._width = this.boundingBox_mc._height = 0;
  21.    }
  22.    function size()
  23.    {
  24.       this.border_mc.move(0,0);
  25.       this.border_mc.setSize(this.__get__width(),this.__get__height());
  26.       this.doLayout();
  27.    }
  28.    function draw()
  29.    {
  30.       this.size();
  31.    }
  32.    function get numChildren()
  33.    {
  34.       var _loc3_ = mx.core.View.childNameBase;
  35.       var _loc2_ = 0;
  36.       while(true)
  37.       {
  38.          if(this[_loc3_ + _loc2_] == undefined)
  39.          {
  40.             return _loc2_;
  41.          }
  42.          _loc2_ = _loc2_ + 1;
  43.       }
  44.       return -1;
  45.    }
  46.    function get tabIndex()
  47.    {
  48.       return !this.tabEnabled ? undefined : this.__tabIndex;
  49.    }
  50.    function set tabIndex(n)
  51.    {
  52.       this.__tabIndex = n;
  53.    }
  54.    function addLayoutObject(object)
  55.    {
  56.    }
  57.    function createChild(className, instanceName, initProps)
  58.    {
  59.       if(this.depth == undefined)
  60.       {
  61.          this.depth = 1;
  62.       }
  63.       var _loc2_ = undefined;
  64.       if(typeof className == "string")
  65.       {
  66.          _loc2_ = this.createObject(className,instanceName,this.depth++,initProps);
  67.       }
  68.       else
  69.       {
  70.          _loc2_ = this.createClassObject(className,instanceName,this.depth++,initProps);
  71.       }
  72.       if(_loc2_ == undefined)
  73.       {
  74.          _loc2_ = this.loadExternal(className,this._loadExternalClass,instanceName,this.depth++,initProps);
  75.       }
  76.       else
  77.       {
  78.          this[mx.core.View.childNameBase + this.__get__numChildren()] = _loc2_;
  79.          _loc2_._complete = true;
  80.          this.childLoaded(_loc2_);
  81.       }
  82.       this.addLayoutObject(_loc2_);
  83.       return _loc2_;
  84.    }
  85.    function getChildAt(childIndex)
  86.    {
  87.       return this[mx.core.View.childNameBase + childIndex];
  88.    }
  89.    function destroyChildAt(childIndex)
  90.    {
  91.       if(!(childIndex >= 0 && childIndex < this.__get__numChildren()))
  92.       {
  93.          return undefined;
  94.       }
  95.       var _loc4_ = mx.core.View.childNameBase + childIndex;
  96.       var _loc6_ = this.__get__numChildren();
  97.       var _loc3_ = undefined;
  98.       for(_loc3_ in this)
  99.       {
  100.          if(_loc3_ == _loc4_)
  101.          {
  102.             _loc4_ = "";
  103.             this.destroyObject(_loc3_);
  104.             break;
  105.          }
  106.       }
  107.       var _loc2_ = Number(childIndex);
  108.       while(_loc2_ < _loc6_ - 1)
  109.       {
  110.          this[mx.core.View.childNameBase + _loc2_] = this[mx.core.View.childNameBase + (_loc2_ + 1)];
  111.          _loc2_ = _loc2_ + 1;
  112.       }
  113.       delete this[mx.core.View.childNameBase + (_loc6_ - 1)];
  114.       this.depth = this.depth - 1;
  115.    }
  116.    function initLayout()
  117.    {
  118.       if(!this.hasBeenLayedOut)
  119.       {
  120.          this.doLayout();
  121.       }
  122.    }
  123.    function doLayout()
  124.    {
  125.       this.hasBeenLayedOut = true;
  126.    }
  127.    function createChildren()
  128.    {
  129.       if(this.border_mc == undefined)
  130.       {
  131.          this.border_mc = this.createClassChildAtDepth(_global.styles.rectBorderClass,mx.managers.DepthManager.kBottom,{styleName:this});
  132.       }
  133.       this.doLater(this,"initLayout");
  134.    }
  135.    function convertToUIObject(obj)
  136.    {
  137.    }
  138.    function childLoaded(obj)
  139.    {
  140.       this.convertToUIObject(obj);
  141.    }
  142.    static function extension()
  143.    {
  144.       mx.core.ExternalContent.enableExternalContent();
  145.    }
  146. }
  147.