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

  1. stop();
  2. this.onEnterFrame = function()
  3. {
  4.    CO = Math.random() * 40;
  5.    CT = Math.round(Math.random() * 1);
  6.    if(CO >= 39 && CO <= 40 && _root.PGeneration == true)
  7.    {
  8.       if(CT == 0)
  9.       {
  10.          this.attachMovie("GoodTargetTopID","GoodTargetTop" + MovD,MovD);
  11.          this["GoodTargetTop" + MovD]._x = Math.random() * 500 + 150;
  12.          MovD++;
  13.       }
  14.       else if(CT == 1)
  15.       {
  16.          this.attachMovie("BadTargetTopID","BadTargetTop" + MovD,MovD);
  17.          this["BadTargetTop" + MovD]._x = Math.random() * 500 + 150;
  18.          MovD++;
  19.       }
  20.    }
  21.    else if(CO >= 0 && CO <= 1 && _root.PGeneration == true)
  22.    {
  23.       if(CT == 0)
  24.       {
  25.          this.attachMovie("GoodTargetBottomID","GoodTargetBottom" + MovD,MovD);
  26.          this["GoodTargetBottom" + MovD]._x = Math.random() * 500 + 150;
  27.          this["GoodTargetBottom" + MovD]._y = 650;
  28.          MovD++;
  29.       }
  30.       else if(CT == 1)
  31.       {
  32.          this.attachMovie("BadTargetBottomID","BadTargetBottom" + MovD,MovD);
  33.          this["BadTargetBottom" + MovD]._x = Math.random() * 500 + 150;
  34.          this["BadTargetBottom" + MovD]._y = 650;
  35.          MovD++;
  36.       }
  37.    }
  38.    else if(CO >= 5 && CO <= 6 && _root.PGeneration == true)
  39.    {
  40.       if(CT == 0 && _root.StageLevel >= 4)
  41.       {
  42.          this.attachMovie("GoodTargetBlueBottomID","GoodTargetBlueBottom" + MovD,MovD);
  43.          this["GoodTargetBlueBottom" + MovD]._x = Math.random() * 500 + 150;
  44.          this["GoodTargetBlueBottom" + MovD]._y = 650;
  45.          MovD++;
  46.       }
  47.       else if(CT == 1 && _root.StageLevel >= 10)
  48.       {
  49.          this.attachMovie("GoodTargetPurpleBottomID","GoodTargetPurpleBottom" + MovD,MovD);
  50.          this["GoodTargetPurpleBottom" + MovD]._x = Math.random() * 500 + 150;
  51.          this["GoodTargetPurpleBottom" + MovD]._y = 650;
  52.          MovD++;
  53.       }
  54.    }
  55.    else if(CO >= 7 && CO <= 8 && _root.PGeneration == true)
  56.    {
  57.       if(CT == 0 && _root.StageLevel >= 7)
  58.       {
  59.          this.attachMovie("GoodTargetBlueTopID","GoodTargetBlueTop" + MovD,MovD);
  60.          this["GoodTargetBlueTop" + MovD]._x = Math.random() * 500 + 150;
  61.          this["GoodTargetBlueTop" + MovD]._y = 650;
  62.          MovD++;
  63.       }
  64.       else if(CT == 1 && _root.StageLevel >= 12)
  65.       {
  66.          this.attachMovie("GoodTargetPurpleTopID","GoodTargetPurpleTop" + MovD,MovD);
  67.          this["GoodTargetPurpleTop" + MovD]._x = Math.random() * 500 + 150;
  68.          this["GoodTargetPurpleTop" + MovD]._y = 650;
  69.          MovD++;
  70.       }
  71.    }
  72.    if(MovD >= 250)
  73.    {
  74.       MovD = 200;
  75.    }
  76.    if(_root.StageLevel >= 4)
  77.    {
  78.       if(Key.isDown(37))
  79.       {
  80.          _root.BeamColor = "0x9933CC";
  81.       }
  82.       else if(Key.isDown(39))
  83.       {
  84.          _root.BeamColor = "0x0000FF";
  85.       }
  86.    }
  87. };
  88.