home *** CD-ROM | disk | FTP | other *** search
/ Champak 50 / Volume 50 - JOGO DISK .iso / Games / mallcrawl.swf / scripts / __Packages / mx / skins / CustomBorder.as < prev    next >
Encoding:
Text File  |  2007-09-28  |  2.6 KB  |  104 lines

  1. class mx.skins.CustomBorder extends mx.skins.Border
  2. {
  3.    var __width;
  4.    var __height;
  5.    var l_mc;
  6.    var minHeight;
  7.    var minWidth;
  8.    var m_mc;
  9.    var r_mc;
  10.    static var symbolName = "CustomBorder";
  11.    static var symbolOwner = mx.skins.CustomBorder;
  12.    static var version = "2.0.2.126";
  13.    var className = "CustomBorder";
  14.    static var tagL = 0;
  15.    static var tagM = 1;
  16.    static var tagR = 2;
  17.    var idNames = new Array("l_mc","m_mc","r_mc");
  18.    var leftSkin = "F3PieceLeft";
  19.    var middleSkin = "F3PieceMiddle";
  20.    var rightSkin = "F3PieceRight";
  21.    var horizontal = true;
  22.    function CustomBorder()
  23.    {
  24.       super();
  25.    }
  26.    function get width()
  27.    {
  28.       return this.__width;
  29.    }
  30.    function get height()
  31.    {
  32.       return this.__height;
  33.    }
  34.    function init(Void)
  35.    {
  36.       super.init();
  37.    }
  38.    function createChildren(Void)
  39.    {
  40.    }
  41.    function draw(Void)
  42.    {
  43.       if(this.l_mc == undefined)
  44.       {
  45.          var _loc2_ = this.setSkin(mx.skins.CustomBorder.tagL,this.leftSkin);
  46.          if(this.horizontal)
  47.          {
  48.             this.minHeight = this.l_mc._height;
  49.             this.minWidth = this.l_mc._width;
  50.          }
  51.          else
  52.          {
  53.             this.minHeight = this.l_mc._height;
  54.             this.minWidth = this.l_mc._width;
  55.          }
  56.       }
  57.       if(this.m_mc == undefined)
  58.       {
  59.          this.setSkin(mx.skins.CustomBorder.tagM,this.middleSkin);
  60.          if(this.horizontal)
  61.          {
  62.             this.minHeight = this.m_mc._height;
  63.             this.minWidth += this.m_mc._width;
  64.          }
  65.          else
  66.          {
  67.             this.minHeight += this.m_mc._height;
  68.             this.minWidth = this.m_mc._width;
  69.          }
  70.       }
  71.       if(this.r_mc == undefined)
  72.       {
  73.          this.setSkin(mx.skins.CustomBorder.tagR,this.rightSkin);
  74.          if(this.horizontal)
  75.          {
  76.             this.minHeight = this.r_mc._height;
  77.             this.minWidth += this.r_mc._width;
  78.          }
  79.          else
  80.          {
  81.             this.minHeight += this.r_mc._height;
  82.             this.minWidth = this.r_mc._width;
  83.          }
  84.       }
  85.       this.size();
  86.    }
  87.    function size(Void)
  88.    {
  89.       this.l_mc.move(0,0);
  90.       if(this.horizontal)
  91.       {
  92.          this.r_mc.move(this.width - this.r_mc.width,0);
  93.          this.m_mc.move(this.l_mc.width,0);
  94.          this.m_mc.setSize(this.r_mc.x - this.m_mc.x,this.m_mc.height);
  95.       }
  96.       else
  97.       {
  98.          this.r_mc.move(0,this.height - this.r_mc.height,0);
  99.          this.m_mc.move(0,this.l_mc.height);
  100.          this.m_mc.setSize(this.m_mc.width,this.r_mc.y - this.m_mc.y);
  101.       }
  102.    }
  103. }
  104.