home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / gladiator_castle_war.swf / scripts / DefineSprite_401 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-03-15  |  1.6 KB  |  85 lines

  1. var so = SharedObject.getLocal("unlockable");
  2. if(so.data.timesFinished)
  3. {
  4.    timeswon = "times won - " + so.data.timesFinished;
  5.    if(so.data.timesFinished >= 1)
  6.    {
  7.       if(so.data.godmode)
  8.       {
  9.          u2.nextFrame();
  10.       }
  11.       if(so.data.doubledamage)
  12.       {
  13.          u4.nextFrame();
  14.       }
  15.       u2.onRelease = function()
  16.       {
  17.          if(this._currentframe == 1)
  18.          {
  19.             this.nextFrame();
  20.             so.data.godmode = true;
  21.          }
  22.          else
  23.          {
  24.             this.prevFrame();
  25.             so.data.godmode = false;
  26.          }
  27.       };
  28.    }
  29.    else
  30.    {
  31.       u2._alpha = 50;
  32.    }
  33.    if(so.data.timesFinished >= 2)
  34.    {
  35.       u3.onRelease = function()
  36.       {
  37.          _root.gotoAndStop("altoutro");
  38.       };
  39.    }
  40.    else
  41.    {
  42.       u3._alpha = 50;
  43.    }
  44.    if(so.data.timesFinished >= 3)
  45.    {
  46.       u4.onRelease = function()
  47.       {
  48.          if(this._currentframe == 1)
  49.          {
  50.             this.nextFrame();
  51.             so.data.doubledamage = true;
  52.          }
  53.          else
  54.          {
  55.             this.prevFrame();
  56.             so.data.doubledamage = false;
  57.          }
  58.       };
  59.    }
  60.    else
  61.    {
  62.       u4._alpha = 50;
  63.    }
  64. }
  65. else
  66. {
  67.    timeswon = "times won - 0";
  68.    u2._alpha = u3._alpha = u4._alpha = 50;
  69. }
  70. if(so.data.furthest)
  71. {
  72.    furthest = "furthest " + so.data.furthest + " battles";
  73.    if(so.data.furthest >= 15)
  74.    {
  75.       u1.onRelease = function()
  76.       {
  77.          _root.gotoAndStop("altintro");
  78.       };
  79.    }
  80.    else
  81.    {
  82.       u1._alpha = 50;
  83.    }
  84. }
  85.