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

  1. class application.screens.DisclaimScrollScreen extends application.screens.AbstractScreen implements application.models.IScreen
  2. {
  3.    var scrollpos;
  4.    var tf;
  5.    var controller;
  6.    var btn0;
  7.    var btn1;
  8.    function DisclaimScrollScreen()
  9.    {
  10.       super();
  11.       this.scrollpos = 1;
  12.    }
  13.    function setTextField(tf)
  14.    {
  15.       this.tf = tf;
  16.    }
  17.    function build()
  18.    {
  19.       var _loc3_ = 0;
  20.       while(_loc3_ < 2)
  21.       {
  22.          var _loc2_ = this["btn" + _loc3_];
  23.          this.buildButton(_loc2_);
  24.          this.createFocusRec(_loc2_,_loc2_._width,_loc2_._height,0,0);
  25.          application.core.FocusManager.getInstance().registerButton(_loc2_,88 + _loc3_);
  26.          _loc2_.onRelease = function()
  27.          {
  28.             if(this.enabled)
  29.             {
  30.                application.core.FocusManager.getInstance().switchFocus(this);
  31.                this.gotoAndStop(2);
  32.                this.controller.onButtonRelease(this);
  33.             }
  34.          };
  35.          this._x = 723;
  36.          this._y = 293;
  37.          _loc3_ = _loc3_ + 1;
  38.       }
  39.       this.btn0 = this.btn0;
  40.       this.btn1 = this.btn1;
  41.       this.btn0.onDisable();
  42.       this.btn0._visible = false;
  43.    }
  44.    function onButtonRollOver(mc)
  45.    {
  46.    }
  47.    function onButtonRollOut(mc)
  48.    {
  49.    }
  50.    function onButtonPress(mc)
  51.    {
  52.    }
  53.    function onButtonRelease(mc)
  54.    {
  55.       switch(mc._name)
  56.       {
  57.          case "btn0":
  58.             this.tf.scroll -= 1;
  59.             this.scrollpos = this.scrollpos - 1;
  60.             if(this.scrollpos == 1 && this.btn0._visible == true)
  61.             {
  62.                this.btn0.onDisable();
  63.                this.btn0._visible = false;
  64.             }
  65.             if(this.scrollpos < this.tf.maxscroll && this.btn1._visible == false)
  66.             {
  67.                this.btn1.onEnable();
  68.                this.btn1._visible = true;
  69.             }
  70.             break;
  71.          case "btn1":
  72.             this.tf.scroll += 1;
  73.             this.scrollpos = this.scrollpos + 1;
  74.             if(this.scrollpos > 1 && this.btn0._visible == false)
  75.             {
  76.                this.btn0.onEnable();
  77.                this.btn0._visible = true;
  78.             }
  79.             if(this.scrollpos == this.tf.maxscroll)
  80.             {
  81.                this.btn1.onDisable();
  82.                this.btn1._visible = false;
  83.             }
  84.       }
  85.    }
  86.    function onButtonDisable(mc)
  87.    {
  88.    }
  89.    function onButtonEnable(mc)
  90.    {
  91.    }
  92.    function onButtonReleaseOutside(mc)
  93.    {
  94.    }
  95. }
  96.