home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / rocketcar2.swf / scripts / DefineSprite_56_bomb / frame_1 / DoAction.as
Encoding:
Text File  |  2008-09-24  |  670 b   |  44 lines

  1. stop();
  2. time = 0;
  3. g = 0.5;
  4. v = 0;
  5. b = new Sound(this);
  6. b.attachSound("bomb");
  7. if(_root.sound)
  8. {
  9.    b.start();
  10. }
  11. this.onEnterFrame = function()
  12. {
  13.    if(_root.paused)
  14.    {
  15.       return undefined;
  16.    }
  17.    time++;
  18.    v -= g;
  19.    _Y = _Y - v;
  20.    if(_root.bg.hitTest(_X,_Y + 10,true))
  21.    {
  22.       delete onEnterFrame;
  23.       gotoAndStop(2);
  24.    }
  25.    if(time > 10)
  26.    {
  27.       if(_root.boss.health > 0)
  28.       {
  29.          if(this.hitTest(_root.car))
  30.          {
  31.             _root.kill();
  32.          }
  33.       }
  34.    }
  35.    if(_root.level !== 5)
  36.    {
  37.       this.removeMovieClip();
  38.    }
  39.    if(_root.car.dead)
  40.    {
  41.       this.removeMovieClip();
  42.    }
  43. };
  44.