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

  1. class application.screens.ModulHolderScreen extends application.screens.AbstractScreen implements application.models.IScreen
  2. {
  3.    var dataObj;
  4.    var modul0;
  5.    var modul1;
  6.    var modulBackground;
  7.    var log;
  8.    var configObj;
  9.    var systemObj;
  10.    function ModulHolderScreen()
  11.    {
  12.       super();
  13.    }
  14.    function update(activeMain)
  15.    {
  16.       if(activeMain == 6)
  17.       {
  18.          if(this.dataObj.showClientModule == true)
  19.          {
  20.             this.modul0.btn.onRollOut();
  21.             this.modul0.btn.onDisable();
  22.             this.modul0._visible = false;
  23.          }
  24.          if(this.dataObj.showSoftwareModule == true)
  25.          {
  26.             this.modul1._visible = true;
  27.             this.modul1.btn.onEnable();
  28.             this.modul1.btn.onRollOut();
  29.             this.modul1.background._visible = false;
  30.          }
  31.          this.modulBackground._visible = true;
  32.       }
  33.       else if(activeMain == 7 || activeMain == 8)
  34.       {
  35.          if(this.dataObj.showSoftwareModule == true)
  36.          {
  37.             this.modul1._visible = false;
  38.             this.modul1.btn.onRollOut();
  39.             this.modul1.btn.onDisable();
  40.          }
  41.          if(this.dataObj.showClientModule == true)
  42.          {
  43.             this.modul0._visible = true;
  44.             this.modul0.btn.onEnable();
  45.             this.modul0.btn.onRollOut();
  46.             this.modul0.background._visible = false;
  47.          }
  48.          this.modulBackground._visible = true;
  49.       }
  50.       else if(application.core.ContentManager.getInstance().isClosing() == false)
  51.       {
  52.          if(this.dataObj.showClientModule == true)
  53.          {
  54.             this.modul0._visible = true;
  55.             this.modul0.btn.onEnable();
  56.             this.modul0.btn.onRollOut();
  57.             this.modul0.background._visible = true;
  58.          }
  59.          if(this.dataObj.showSoftwareModule == true)
  60.          {
  61.             this.modul1._visible = true;
  62.             this.modul1.btn.onEnable();
  63.             this.modul1.btn.onRollOut();
  64.             this.modul1.background._visible = true;
  65.          }
  66.          if(this.dataObj.showClientModule != true || this.dataObj.showSoftwareModule != true)
  67.          {
  68.             this.modul0.background._visible = false;
  69.             this.modul1.background._visible = false;
  70.             this.modulBackground._visible = true;
  71.          }
  72.          else
  73.          {
  74.             this.modulBackground._visible = false;
  75.          }
  76.       }
  77.       else
  78.       {
  79.          if(this.dataObj.showClientModule == true)
  80.          {
  81.             this.modul0._visible = true;
  82.             this.modul0.btn.onDisable();
  83.             this.modul0.background._visible = true;
  84.          }
  85.          if(this.dataObj.showSoftwareModule == true)
  86.          {
  87.             this.modul1._visible = true;
  88.             this.modul1.btn.onDisable();
  89.             this.modul1.background._visible = true;
  90.          }
  91.          if(this.dataObj.showClientModule != true || this.dataObj.showSoftwareModule != true)
  92.          {
  93.             this.modul0.background._visible = false;
  94.             this.modul1.background._visible = false;
  95.             this.modulBackground._visible = true;
  96.          }
  97.          else
  98.          {
  99.             this.modulBackground._visible = false;
  100.          }
  101.       }
  102.    }
  103.    function build()
  104.    {
  105.       this.modulBackground._visible = false;
  106.       var _loc2_ = 0;
  107.       while(_loc2_ < 2)
  108.       {
  109.          if(_loc2_ == 0 && this.dataObj.showClientModule == true || _loc2_ == 1 && this.dataObj.showSoftwareModule == true)
  110.          {
  111.             this.log.showMessage("build Module=" + _loc2_);
  112.             var _loc3_ = this["modul" + _loc2_];
  113.             _loc3_.headline.text = this.configObj.textList["modul" + _loc2_ + "HeadLine"];
  114.             if(this.systemObj.isWinXP)
  115.             {
  116.                _loc3_.description.text = this.configObj.textList["modul" + _loc2_ + "Description"];
  117.             }
  118.             else if(_loc2_ == 0)
  119.             {
  120.                _loc3_.description.text = this.configObj.textList["modul" + _loc2_ + "Description"];
  121.             }
  122.             else
  123.             {
  124.                _loc3_.description.text = this.configObj.textList["modul" + _loc2_ + "DescriptionNoneXP"];
  125.             }
  126.             this.buildButton(_loc3_.btn);
  127.             _loc3_.btn.mainId = 6 + _loc2_;
  128.             if(_loc2_ != 0)
  129.             {
  130.                _loc3_.btn.subId = 0;
  131.             }
  132.             else
  133.             {
  134.                _loc3_.btn.subId = 1;
  135.             }
  136.             this.setLabel(_loc3_.btn,this.configObj.textList["modul" + _loc2_ + "ButtonLabel"],false);
  137.             this.createFocusRec(_loc3_.btn,100,52,0,0);
  138.             application.core.FocusManager.getInstance().registerButton(_loc3_.btn,100 + _loc2_);
  139.          }
  140.          else
  141.          {
  142.             this["modul" + _loc2_]._visible = false;
  143.             this["modul" + _loc2_].btn.gotoAndStop(1);
  144.          }
  145.          _loc2_ = _loc2_ + 1;
  146.       }
  147.       if(this.dataObj.showClientModule != true || this.dataObj.showSoftwareModule != true)
  148.       {
  149.          this.modul0.background._visible = this.dataObj.showClientModule;
  150.          this.modul1.background._visible = this.dataObj.showSoftwareModule;
  151.          this.modulBackground._visible = true;
  152.       }
  153.    }
  154.    function onButtonRollOver(mc)
  155.    {
  156.       mc.label.textColor = 14418032;
  157.    }
  158.    function onButtonRollOut(mc)
  159.    {
  160.       mc.label.textColor = 3355443;
  161.    }
  162.    function onButtonPress(mc)
  163.    {
  164.       mc.label._y += 1;
  165.    }
  166.    function onButtonRelease(mc)
  167.    {
  168.       mc.label._y -= 1;
  169.       mc.onRollOut();
  170.       if(this.systemObj.isWinXP)
  171.       {
  172.          if(mc.mainId == 7)
  173.          {
  174.             if(this.systemObj.is64bit == false)
  175.             {
  176.                application.core.ContentManager.getInstance().showContent(3,mc.mainId,mc.subId);
  177.             }
  178.             else
  179.             {
  180.                application.core.ContentManager.getInstance().showInfoPopup64bit();
  181.             }
  182.          }
  183.          else
  184.          {
  185.             application.core.ContentManager.getInstance().showContent(3,mc.mainId,mc.subId);
  186.          }
  187.       }
  188.       else if(mc.mainId == 7)
  189.       {
  190.          application.core.ContentManager.getInstance().showPopup();
  191.       }
  192.       else
  193.       {
  194.          application.core.ContentManager.getInstance().showContent(3,mc.mainId,mc.subId);
  195.       }
  196.    }
  197.    function onButtonDisable(mc)
  198.    {
  199.       mc.gotoAndStop(1);
  200.    }
  201.    function onButtonEnable(mc)
  202.    {
  203.    }
  204.    function onButtonReleaseOutside(mc)
  205.    {
  206.       mc.label._y -= 1;
  207.       mc.onRollOut();
  208.    }
  209. }
  210.