home *** CD-ROM | disk | FTP | other *** search
- class application.screens.DisclaimScrollScreen extends application.screens.AbstractScreen implements application.models.IScreen
- {
- var scrollpos;
- var tf;
- var controller;
- var btn0;
- var btn1;
- function DisclaimScrollScreen()
- {
- super();
- this.scrollpos = 1;
- }
- function setTextField(tf)
- {
- this.tf = tf;
- }
- function build()
- {
- var _loc3_ = 0;
- while(_loc3_ < 2)
- {
- var _loc2_ = this["btn" + _loc3_];
- this.buildButton(_loc2_);
- this.createFocusRec(_loc2_,_loc2_._width,_loc2_._height,0,0);
- application.core.FocusManager.getInstance().registerButton(_loc2_,88 + _loc3_);
- _loc2_.onRelease = function()
- {
- if(this.enabled)
- {
- application.core.FocusManager.getInstance().switchFocus(this);
- this.gotoAndStop(2);
- this.controller.onButtonRelease(this);
- }
- };
- this._x = 723;
- this._y = 293;
- _loc3_ = _loc3_ + 1;
- }
- this.btn0 = this.btn0;
- this.btn1 = this.btn1;
- this.btn0.onDisable();
- this.btn0._visible = false;
- }
- function onButtonRollOver(mc)
- {
- }
- function onButtonRollOut(mc)
- {
- }
- function onButtonPress(mc)
- {
- }
- function onButtonRelease(mc)
- {
- switch(mc._name)
- {
- case "btn0":
- this.tf.scroll -= 1;
- this.scrollpos = this.scrollpos - 1;
- if(this.scrollpos == 1 && this.btn0._visible == true)
- {
- this.btn0.onDisable();
- this.btn0._visible = false;
- }
- if(this.scrollpos < this.tf.maxscroll && this.btn1._visible == false)
- {
- this.btn1.onEnable();
- this.btn1._visible = true;
- }
- break;
- case "btn1":
- this.tf.scroll += 1;
- this.scrollpos = this.scrollpos + 1;
- if(this.scrollpos > 1 && this.btn0._visible == false)
- {
- this.btn0.onEnable();
- this.btn0._visible = true;
- }
- if(this.scrollpos == this.tf.maxscroll)
- {
- this.btn1.onDisable();
- this.btn1._visible = false;
- }
- }
- }
- function onButtonDisable(mc)
- {
- }
- function onButtonEnable(mc)
- {
- }
- function onButtonReleaseOutside(mc)
- {
- }
- }
-