home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / Titans / cyborg.swf / scripts / DefineSprite_63_s2 / frame_5 / DoAction.as
Encoding:
Text File  |  2006-01-05  |  828 b   |  50 lines

  1. x = _X;
  2. y = _Y;
  3. ro = 60;
  4. dispass = -2;
  5. d = 15;
  6. ys = 2;
  7. if(random(100) > 50)
  8. {
  9.    dir = -1;
  10. }
  11. onenterframe = function()
  12. {
  13.    if(dir < 0)
  14.    {
  15.       _X = x + math.sin(a++ * 0.1) * 100;
  16.    }
  17.    else
  18.    {
  19.       _X = x - math.sin(a++ * 0.1) * 100;
  20.    }
  21.    s._rotation += ro;
  22.    d--;
  23.    if(d < 0)
  24.    {
  25.       _Y = _Y + ys;
  26.       ys += 3;
  27.       dis += dispass;
  28.       _xscale = _xscale * 1.12;
  29.       _yscale = _yscale * 1.12;
  30.       if(_Y > 320)
  31.       {
  32.          if(math.abs(r.cbx - _X) < r.bombrange)
  33.          {
  34.             r.hit = 1;
  35.             r.zhit.start();
  36.             r.enemies.removevalue(_name);
  37.          }
  38.          this.removeMovieClip();
  39.       }
  40.    }
  41.    cekhit2();
  42.    if(hit)
  43.    {
  44.       r.score += r.point;
  45.       r.zboom.start();
  46.       this.gotoAndPlay("exp");
  47.    }
  48. };
  49. stop();
  50.