home *** CD-ROM | disk | FTP | other *** search
/ The Complete Idiot's Guide to Microsoft Excel 2010 / CIGExcel.iso / Videos / Flash / controller.swf / scripts / __Packages / com / techsmith / widgets / panels / VPanel.as < prev   
Encoding:
Text File  |  2010-09-09  |  1.1 KB  |  35 lines

  1. class com.techsmith.widgets.panels.VPanel extends com.techsmith.widgets.Movable implements com.techsmith.widgets.panels.IPanel
  2. {
  3.    var m_left = null;
  4.    var m_mid = null;
  5.    var m_right = null;
  6.    function VPanel()
  7.    {
  8.       super();
  9.    }
  10.    function init(width, styles)
  11.    {
  12.       this.m_left = this.attachMovie(styles.left_top,"m_left",1,{_x:0,y:0,_visible:false});
  13.       this.m_mid = this.attachMovie(styles.middle,"m_mid",2,{_x:0,y:0,_visible:false});
  14.       this.m_right = this.attachMovie(styles.right_bottom,"m_right",3,{_x:0,y:0,_visible:false});
  15.       if(width == null || width == undefined || isNaN(width))
  16.       {
  17.          this.setSize(100);
  18.       }
  19.       else
  20.       {
  21.          this.setSize(width);
  22.       }
  23.       this.m_left._visible = true;
  24.       this.m_mid._visible = true;
  25.       this.m_right._visible = true;
  26.    }
  27.    function setSize(width, height)
  28.    {
  29.       var _loc2_ = width - (this.m_left._width + this.m_right._width);
  30.       this.m_mid._x = this.m_left._width;
  31.       this.m_mid._width = _loc2_;
  32.       this.m_right._x = this.m_mid._x + _loc2_;
  33.    }
  34. }
  35.