Instance of Symbol 6 MovieClip in Frame 1
onClipEvent (load) {
speed = 7;
}
onClipEvent (enterFrame) {
if (Key.isDown(37) and (_x > 30)) {
_x = (_x - speed);
}
if (Key.isDown(39) and (_x < 550)) {
_x = (_x + speed);
}
if (Key.isDown(38) and (_y > 30)) {
_y = (_y - speed);
}
if (Key.isDown(40) and (_y < 375)) {
_y = (_y + speed);
}
if (Key.isDown(32)) {
if (!a) {
_root.attachMovie("playerbullet1", "sparo" + i, i);
_root["sparo" + i]._x = this._x - (_width / 2);
_root["sparo" + i]._y = this._y - (_height / 2);
i++;
a = true;
}
} else {
a = false;
}
}
Instance of Symbol 3 MovieClip [playerbullet1] in Frame 1
onClipEvent (enterFrame) {
this._y = this._y - 20;
if (((this._x < 0) || (this._x > Stage.width)) || (this._y < 0)) {
this.removeMovieClip();
}
}