home *** CD-ROM | disk | FTP | other *** search
/ T-Online 6 / T-Online.iso / Animation / content / intro / intro.swf / scripts / __Packages / application / screens / InfoScreen.as < prev    next >
Encoding:
Text File  |  2005-10-20  |  2.0 KB  |  81 lines

  1. class application.screens.InfoScreen extends application.screens.AbstractScreen implements application.models.IScreen
  2. {
  3.    var info;
  4.    var dataObj;
  5.    var currentId;
  6.    var popup;
  7.    function InfoScreen()
  8.    {
  9.       super();
  10.    }
  11.    function build()
  12.    {
  13.       this.info = new application.ui.DynamicInfoTextfield();
  14.       this.info.setContainer(this);
  15.       this.info.setDataObj(this.dataObj);
  16.    }
  17.    function update(id, softwarList)
  18.    {
  19.       if(id != null)
  20.       {
  21.          if(id == this.currentId)
  22.          {
  23.             return undefined;
  24.          }
  25.          if(this.popup != null)
  26.          {
  27.             application.core.FocusManager.getInstance().killCurrentFocus();
  28.             this.popup.removeMovieClip();
  29.          }
  30.          this.currentId = id;
  31.          var _loc3_ = this.info.run(id);
  32.          var _loc7_ = 445;
  33.          var _loc6_ = 309;
  34.          this.popup = _loc3_.mc;
  35.          this.popup._x = 82;
  36.          this.popup._y = 80;
  37.          this.popup._x = this.popup._x + _loc7_ - _loc3_.w;
  38.          var _loc4_ = softwarList.getInfoButton(id);
  39.          var _loc2_ = new Object();
  40.          _loc2_.x = int(_loc4_._x);
  41.          _loc2_.y = int(_loc4_._y);
  42.          _loc4_.localToGlobal(_loc2_);
  43.          if(_loc2_.y + _loc3_.h + 9 - this._parent._y > this.popup._y + _loc6_ || _loc2_.y + 9 - this._parent._y < this.popup._y)
  44.          {
  45.             this.popup._y += int((_loc6_ - _loc3_.h) / 2);
  46.          }
  47.          else
  48.          {
  49.             this.popup._y = _loc2_.y + 9 - this._parent._y;
  50.          }
  51.       }
  52.       else
  53.       {
  54.          this.popup.removeMovieClip();
  55.          this.currentId = null;
  56.          this.popup = null;
  57.       }
  58.    }
  59.    function onButtonRollOver(mc)
  60.    {
  61.    }
  62.    function onButtonRollOut(mc)
  63.    {
  64.    }
  65.    function onButtonPress(mc)
  66.    {
  67.    }
  68.    function onButtonRelease(mc)
  69.    {
  70.    }
  71.    function onButtonDisable(mc)
  72.    {
  73.    }
  74.    function onButtonEnable(mc)
  75.    {
  76.    }
  77.    function onButtonReleaseOutside(mc)
  78.    {
  79.    }
  80. }
  81.