Frame 1
_root.AMMO = 15;
_root.TRIGGER = 0;
_root.FIRE = 0;
stop();
Instance of Symbol 20 MovieClip in Frame 1
onClipEvent (mouseDown) {
_root.TRIGGER = 1;
}
onClipEvent (mouseUp) {
_root.TRIGGER = 0;
}
onClipEvent (enterFrame) {
Xd = _root._xmouse - _x;
Yd = _root._ymouse - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 360) / (Math.PI*2)) + 125);
updateAfterEvent();
if (((_root.TRIGGER == 1) && (_root.AMMO > 0)) && (_root.FIRE == 0)) {
play();
_root.AMMO = _root.AMMO - 1;
_root.FIRE = 1;
}
if ((Key.isDown(32) && (_root.FIRE == 0)) && (_root.AMMO == 0)) {
gotoAndPlay (6);
}
}
Frame 2
stop();
Symbol 12 MovieClip Frame 1
stop();
Symbol 20 MovieClip Frame 1
stop();
Instance of Symbol 12 MovieClip in Symbol 20 MovieClip Frame 2
onClipEvent (load) {
gotoAndStop(Math.round(Math.random() * 10) + 1);
}
Symbol 20 MovieClip Frame 3
if (_root.AMMO == 0) {
stop();
_root.FIRE = 0;
}
Instance of Symbol 12 MovieClip in Symbol 20 MovieClip Frame 3
onClipEvent (enterFrame) {
if (_root.AMMO == 0) {
gotoAndStop (1);
}
}
Symbol 20 MovieClip Frame 5
_root.FIRE = 0;
gotoAndStop (1);
Instance of Symbol 12 MovieClip in Symbol 20 MovieClip Frame 5
onClipEvent (enterFrame) {
gotoAndStop (1);
}
Symbol 20 MovieClip Frame 85
_root.AMMO = 15;
gotoAndStop (1);