So your probably wondering why the thing won't fire, it's because you have to create something to handle the controls for executing fire();

I did a little something like this:

turret.onEnterFrame=function(){
if(Key.isDown(Key.LEFT)){
this._rotation-=5;
};
if(Key.isDown(Key.RIGHT)){
this._rotation+=5;
};
if(Key.isDown(Key.SPACE)){
fire();
};
};

This controls the turret alone, but is done on the frame actions so it can interact with the global variables without using _root.
As you can see when the respective keys are pressed, the rotation can either be added to or subtracted.
And fire(); can be executed only when space is pressed.
I hope this really helped you to understand this effective way of "Shooting Bullets".
Here's the code unbroken:

var bulletSpeed:Number=5;
var xSpeed:Number=0
var ySpeed:Number=0
var reloadSpeed:Number=100;//milliseconds
var bulletOffset:Number=10;//pixels
var randomNum:Number=0;
var life:Number=0;
var totalLife:Number=50;//frames
var reloaded:Boolean=true;
var x:Number=0;
turret.onEnterFrame=function(){
if(Key.isDown(Key.LEFT)){
this._rotation-=5;
};
if(Key.isDown(Key.RIGHT)){
this._rotation+=5;
};
if(Key.isDown(Key.SPACE)){
fire();
};
};
function fire(){
if(reloaded){
x=_root.getNextHighestDepth();
var bullet:MovieClip=_root.attachMovie("bullet", "bullet"+x, x);
bullet._x=turret._x;
bullet._y=turret._y;
randomNum=random(bulletOffset)-bulletOffset/2;
bullet._rotation=turret._rotation+randomNum;
bullet.xSpeed=Math.cos(Math.PI/180 * bullet._rotation)*bulletSpeed;
bullet.ySpeed=Math.sin(Math.PI/180 * bullet._rotation)*bulletSpeed;
bullet.life=0;
bullet.onEnterFrame=function(){
this._x+=this.xSpeed;
this._y+=this.ySpeed;
this.life++;
if(this.life>totalLife){
this.removeMovieClip();
this.unloadMovie();
};
};
reload();
};
};
function reload(){
reloaded=false;
timer=setInterval(this, "Reloaded", reloadSpeed);
}
function Reloaded(){
clearInterval(timer);
reloaded=true
}

Have fun with this!
Leave a comment and I'll try to help you out.