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

  1. class application.screens.NavigationScreen extends application.screens.AbstractScreen implements application.models.IScreen
  2. {
  3.    var btn1;
  4.    var configObj;
  5.    var btn0;
  6.    var btn2;
  7.    var btn3;
  8.    var dataObj;
  9.    var systemObj;
  10.    function NavigationScreen()
  11.    {
  12.       super();
  13.    }
  14.    function getSoundBtn()
  15.    {
  16.       return this.btn1;
  17.    }
  18.    function build()
  19.    {
  20.       var _loc2_ = 0;
  21.       while(_loc2_ < 5)
  22.       {
  23.          var _loc3_ = this["btn" + _loc2_];
  24.          _loc3_.gotoAndStop(1);
  25.          if(_loc2_ != 1)
  26.          {
  27.             this.buildButton(_loc3_);
  28.          }
  29.          else
  30.          {
  31.             this.buildToggle(_loc3_);
  32.          }
  33.          this["tf" + _loc2_].htmlText = this.configObj.textList["navBtn" + _loc2_];
  34.          this.createFocusRec(_loc3_,36,36,0,0);
  35.          application.core.FocusManager.getInstance().registerButton(_loc3_,_loc2_);
  36.          _loc2_ = _loc2_ + 1;
  37.       }
  38.       this.btn0.onDisable();
  39.    }
  40.    function update(activateHome, activeMain)
  41.    {
  42.       if(activateHome)
  43.       {
  44.          this.btn0.onEnable();
  45.          if(activeMain == 11)
  46.          {
  47.             this.btn2.onDisable();
  48.             this.btn3.onEnable();
  49.          }
  50.          else if(activeMain == 9)
  51.          {
  52.             this.btn2.onEnable();
  53.             this.btn3.onDisable();
  54.          }
  55.          else
  56.          {
  57.             this.btn2.onEnable();
  58.             this.btn3.onEnable();
  59.          }
  60.       }
  61.       else
  62.       {
  63.          this.btn0.onDisable();
  64.          this.btn1.onEnable();
  65.          this.btn2.onEnable();
  66.          this.btn3.onEnable();
  67.       }
  68.    }
  69.    function onButtonRollOver(mc)
  70.    {
  71.    }
  72.    function onButtonRollOut(mc)
  73.    {
  74.    }
  75.    function onButtonPress(mc)
  76.    {
  77.    }
  78.    function onButtonRelease(mc)
  79.    {
  80.       switch(mc._name)
  81.       {
  82.          case "btn0":
  83.             if(this.dataObj.isSmallVersion == false)
  84.             {
  85.                application.core.ContentManager.getInstance().showContent(2,null,null);
  86.             }
  87.             else if(this.systemObj.isWinXP == true)
  88.             {
  89.                if(this.systemObj.is64bit == false)
  90.                {
  91.                   application.core.ContentManager.getInstance().showContent(3,7,0);
  92.                }
  93.                else
  94.                {
  95.                   application.core.ContentManager.getInstance().showInfoPopup64bit();
  96.                }
  97.             }
  98.             else
  99.             {
  100.                application.core.ContentManager.getInstance().showPopup();
  101.             }
  102.             break;
  103.          case "btn1":
  104.             _global.SoundManager.toggleSound();
  105.             break;
  106.          case "btn2":
  107.             application.core.ContentManager.getInstance().showContent(3,11,1);
  108.             break;
  109.          case "btn3":
  110.             application.core.ContentManager.getInstance().showContent(3,9,1);
  111.             break;
  112.          case "btn4":
  113.             application.core.ContentManager.getInstance().close(true);
  114.       }
  115.    }
  116.    function onButtonDisable(mc)
  117.    {
  118.       var _loc2_ = TextField(this["tf" + Number(mc._name.substr(3,4))]);
  119.       _loc2_.textColor = 8355711;
  120.    }
  121.    function onButtonEnable(mc)
  122.    {
  123.       var _loc2_ = TextField(this["tf" + Number(mc._name.substr(3,4))]);
  124.       _loc2_.textColor = 0;
  125.    }
  126.    function onButtonReleaseOutside(mc)
  127.    {
  128.    }
  129. }
  130.