home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / PrettyBang.swf / scripts / DefineSprite_93 / frame_19 / DoAction.as
Encoding:
Text File  |  2007-09-27  |  816 b   |  30 lines

  1. this._x += dx * _parent.max_speed / 4;
  2. this._y += dy * _parent.max_speed / 4;
  3. this._rotation += 10;
  4. if(Math.abs(this._x) > _parent.frame._width / 2 - 64)
  5. {
  6.    this.dx = - this.dx;
  7. }
  8. if(Math.abs(this._y) > _parent.frame._height / 2 - 64)
  9. {
  10.    this.dy = - this.dy;
  11. }
  12. if(_parent.cur_balls < _parent.max_balls / 2)
  13. {
  14.    if(!(gun_delay % 8))
  15.    {
  16.       _parent.new_ball(this._x,this._y,this._rotation,_parent.max_speed / 2,2);
  17.       _parent.new_ball(this._x,this._y,this._rotation + 90,_parent.max_speed / 2,2);
  18.       _parent.new_ball(this._x,this._y,this._rotation + 180,_parent.max_speed / 2,2);
  19.       _parent.new_ball(this._x,this._y,this._rotation - 90,_parent.max_speed / 2,2);
  20.       _root.shot_sfx.start();
  21.    }
  22. }
  23. gun_delay++;
  24. gun_delay %= 64;
  25. if(hp > 0)
  26. {
  27.    prevFrame();
  28.    play();
  29. }
  30.