home *** CD-ROM | disk | FTP | other *** search
- var active = 1;
- if(Math.abs(this._x) > _parent.frame._width / 2)
- {
- active = 0;
- }
- if(Math.abs(this._y) > _parent.frame._height / 2)
- {
- active = 0;
- }
- if(this._visible != active)
- {
- this._visible = active;
- }
- if(active)
- {
- this._x = (_root.absloc(target).x - _parent._x) * 100 / _parent._xscale;
- this._y = (_root.absloc(target).y - _parent._y) * 100 / _parent._yscale;
- if(_parent.cur_balls < _parent.max_balls / 2)
- {
- if(!gun_delay)
- {
- _parent.new_ball(this._x,this._y,this._rotation + 180,_parent.max_speed / 2,2);
- _parent.new_ball(this._x,this._y,this._rotation + 135,_parent.max_speed / 2,2);
- _parent.new_ball(this._x,this._y,this._rotation - 135,_parent.max_speed / 2,2);
- _parent.new_ball(this._x,this._y,this._rotation + 90,_parent.max_speed / 2,2);
- _parent.new_ball(this._x,this._y,this._rotation - 90,_parent.max_speed / 2,2);
- _root.shot_sfx.start();
- }
- }
- }
- gun_delay++;
- gun_delay %= 8;
- prevFrame();
- play();
-