home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / tangerine-panic.swf / scripts / DefineSprite_43 / frame_2 / DoAction.as
Encoding:
Text File  |  2008-09-04  |  547 b   |  30 lines

  1. xspeed *= friction;
  2. yspeed += grav;
  3. yspeed *= friction;
  4. _X = _X + xspeed;
  5. _Y = _Y + yspeed;
  6. if(_Y > bottom)
  7. {
  8.    _Y = bottom;
  9.    yspeed = (- yspeed) * bounce;
  10.    rock_sym.gotoAndPlay(2);
  11. }
  12. if(_X > right && !_root.man.dead)
  13. {
  14.    gotoAndPlay(1);
  15.    _root.score = _root.score + 1;
  16. }
  17. else if(_X > right)
  18. {
  19.    removeMovieClip(this);
  20. }
  21. if(hitTest(_root.man) && getTimer() - _root.hitstart > 1000)
  22. {
  23.    _root.hitstart = getTimer();
  24.    if(!_root.man.dead)
  25.    {
  26.       _root.lives--;
  27.       _root.man.gotoAndPlay("dead");
  28.    }
  29. }
  30.