Why won't my ship shoot? :(

Greetings everyone, I’m making a game based off of space invaders and teaching myself how to code in the process.

Here is the current code for my ship:

onClipEvent (enterFrame) {
var speed = 9;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_x -= speed;
_rotation = -15;
} else {
if (Key.isDown(Key.RIGHT)) {
_x += speed;
_rotation = 15;
} else {
_rotation = 0;
}
}
}
onClipEvent (enterFrame) {
if (this._y>378) {
this._y = 378;
}
if (this._y<0) {
this._y = 0;
}
if (this._x>374) {
this._x = 374;
}
if (this._x<25) {
this._x = 25;
}
}

and here is the code I placed on a separate layer on the time line for my ship to fire bullets, this code was written for me by a friend who told me what each snippet does. I don’t get an error message, but it doesn’t work. Can anyone tell me why?

i = 1;
if (Key.isDown(Key.UP)) {
_root.attachMovie(“bullet”, “bullet”+i, i);
_root[“bullet”].onEnterFrame = function() {
this._y–;
};
}

Thanks in advance guys!