home *** CD-ROM | disk | FTP | other *** search
/ Champak 108 / jogo-disk-108.iso / Games / Titans / robin.swf / scripts / DefineSprite_240_hc / frame_2 / DoAction.as
Text File  |  2010-05-15  |  990b  |  53 lines

  1. xs = -2;
  2. ys = 1;
  3. bomdelay = 10;
  4. r.score += 5 * r.point;
  5. d = bomdelay;
  6. n = 1;
  7. shake = 6;
  8. h.h.k.rot = 15;
  9. stopgun();
  10. onenterframe = function()
  11. {
  12.    _Y = _Y + (ys + 0.5 * random(shake));
  13.    _X = _X + (xs - random(shake));
  14.    _rotation = random(shake);
  15.    if(!shake)
  16.    {
  17.       shake--;
  18.    }
  19.    if(xs < 15)
  20.    {
  21.       xs *= 1.1;
  22.    }
  23.    ys *= 1.02;
  24.    if(_X < -250)
  25.    {
  26.       r.zbigexplosion.start();
  27.       r.enemy.removevalue(_name);
  28.       r.zhc.stop();
  29.       delete onenterframe;
  30.       this.removeMovieClip();
  31.       stop();
  32.    }
  33.    d--;
  34.    if(!d)
  35.    {
  36.       if(n < 3)
  37.       {
  38.          d = bomdelay + random(10);
  39.          duplicateMovieClip("ex","ex" + n,16384 + n);
  40.          this["ex" + n]._xscale = sk;
  41.          this["ex" + n]._yscale = sk;
  42.          this["ex" + n]._x = -20 + random(100);
  43.          this["ex" + n]._y = - random(40);
  44.          n++;
  45.       }
  46.    }
  47.    if(d == 1 or d == 4 or d == 7)
  48.    {
  49.       r.zboom2.start();
  50.    }
  51. };
  52. stop();
  53.