Trigger continues turret fire

I have a turret that fires every time a characters enters a radius the gun begins to fire. I have gotten the turret to aim at the turret and have gotten the bullet to be attached to the turret. But I cannot get it to fire the bullet at the character and do it in rounds such as 2 bullets per second or so on. Heres the script of what I got…

onClipEvent (load) {
xDest = _root.robot._x;
yDest = _root.robot._y;
this._alpha = 100;
}
onClipEvent (enterFrame) {
rx = _root.robot._x;
ry = _root.robot._y;
cx = _root.enemy._x;
cy = _root.enemy._y;
angle = Math.atan2(ry-cy, rx-cx)/(Math.PI/180);
_rotation = angle;
distance = 50;
rx = _root.robot._x;
ry = _root.robot._y;
tx = _root.enemy._x;
ty = _root.enemy._y;
if (Math.sqrt((rx-tx)(rx-tx)+(ry-ty)(ry-ty))<distance) {
_root.enemy.gotoAndPlay(2);

    firepower = Math.sqrt(_root.robot._x*_root.robot._x+_root.robot._y*_root.robot._y);
    if (firepower&gt;200) {
        firepower = 200;
    }
    start_ball_x = _root.enemy.Start_Bullet._x;
    start_ball_y = _root.enemy.Start_Bullet._y;
    cannonball_fired = attachMovie("Ball_Canon", "Ball_Canon"+_root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:start_ball_x, _y:start_ball_y});
    cannonball_fired._x += (xDest-cannonball._x)*.1;
    cannonball_fired._y += (yDest-cannonball._y)*.1;
}

}