home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / ntech.swf / scripts / DefineSprite_271 / frame_2 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  1.2 KB  |  44 lines

  1. stop();
  2. this.onEnterFrame = function()
  3. {
  4.    Type = Math.round(Math.random() * 3 + 1);
  5.    CO = Math.random() * 50;
  6.    CT = Math.round(Math.random() * 50);
  7.    A = new Array();
  8.    if(CO >= 1 && CO <= 2 && CT >= 1 && CT <= 2 && _root.UGeneration == true)
  9.    {
  10.       if(Type == 1)
  11.       {
  12.          this.attachMovie("MissilePowerUPID","MissilePowerUPID" + MovD,MovD);
  13.          A[MovD] = this["MissilePowerUPID" + MovD];
  14.          A[MovD]._x = Math.random() * 500 + 150;
  15.          MovD++;
  16.       }
  17.       else if(Type == 2)
  18.       {
  19.          this.attachMovie("LifeUpID","LifeUpID" + MovD,MovD);
  20.          A[MovD] = this["LifeUpID" + MovD];
  21.          A[MovD]._x = Math.random() * 500 + 150;
  22.          MovD++;
  23.       }
  24.       else if(Type == 3)
  25.       {
  26.          this.attachMovie("CrossPowerUPID","CrossPowerUP" + MovD,MovD);
  27.          A[MovD] = this["CrossPowerUP" + MovD];
  28.          A[MovD]._x = Math.random() * 500 + 150;
  29.          MovD++;
  30.       }
  31.       else if(Type == 4)
  32.       {
  33.          this.attachMovie("DestroyerPowerUPID","DestroyerPowerUP" + MovD,MovD);
  34.          A[MovD] = this["DestroyerPowerUP" + MovD];
  35.          A[MovD]._x = Math.random() * 500 + 150;
  36.          MovD++;
  37.       }
  38.    }
  39.    if(MovD >= 4500)
  40.    {
  41.       MovD = 4001;
  42.    }
  43. };
  44.