home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / tunnelrush.swf / scripts / DefineSprite_5_Ball_Trail / frame_1 / DoAction.as
Encoding:
Text File  |  2007-03-12  |  582 b   |  25 lines

  1. speed = random(5) + 10;
  2. scale = random(2) + 3;
  3. _X = _root.Hero._x;
  4. _Y = _root.Hero._y;
  5. _X = _X + (random(11) - 5);
  6. _Y = _Y + (random(11) - 5);
  7. _xscale = 50;
  8. _yscale = _xscale;
  9. onEnterFrame = function()
  10. {
  11.    if(!_root.dead)
  12.    {
  13.       x = Math.sin((_root.WallHold._rotation - 90) * 0.017453292519943295) * speed;
  14.       y = Math.cos((_root.WallHold._rotation - 90) * 0.017453292519943295) * speed * -1;
  15.       _X = _X + x;
  16.       _Y = _Y + y;
  17.    }
  18.    _xscale = _xscale - scale;
  19.    _yscale = _xscale;
  20.    if(_xscale < 0)
  21.    {
  22.       this.removeMovieClip();
  23.    }
  24. };
  25.