ok then well im making a flash tower defense game for my little brother to play. currently i have the map etc. and have lives set up and also a tower, the code in which im using for this is posted below

Code:
import flash.display.*;
var background = BitmapData.loadBitmap("background");
this.createEmptyMovieClip("bg",this.getNextHighestDepth());
this.bg.attachBitmap(background,this.bg.getNextHighestDepth());

lives=65;
this.attachMovie("lifeBox","lifeBox",this.getNextHighestDepth());
lifeBox._x=640;
lifeBox._y=14;
lifeBox.life.text=lives;

totalScore=10;
this.attachMovie("scoreBox","scoreBox",this.getNextHighestDepth());
scoreBox._x=615;
scoreBox._y=29;
scoreBox.points.text=totalScore;


this.attachMovie("nextwave","nextwave",this.getNextHighestDepth());
nextwave._x=600;
nextwave._y=50;

this.attachMovie("livesText","livesText",this.getNextHighestDepth());
livesText._x=590;
livesText._y=14;

this.attachMovie("scoreText","scoreText",this.getNextHighestDepth());
scoreText._x=590;
scoreText._y=29;

base_range = 300;
can_be_placed = false;
placed = false;
firing = false;
attachMovie("cant_build", "cant_build", _root.getNextHighestDepth());
attachMovie("range", "range", _root.getNextHighestDepth(), {_width:base_range, _height:base_range});
attachMovie("base", "base", _root.getNextHighestDepth());


waypoints=[[40,0],[40,147],[199,148],[199,258],[119,258],[119,369],[376,369],[376,200],[473,200],[473,60],[269,60]];
levelCreeps=10;
levelTotal=0;
levelSpeed=1;
spawn = setInterval(newCreep,1000);

function newCreep()
{
	levelTotal++;
	if(levelTotal>levelCreeps-1)
	{
		clearInterval(spawn);
	}
	name="creep"+levelTotal;
	_root.attachMovie("creeps",name,_root.getNextHighestDepth());
	_root[name]._x=waypoints[0][0];
	_root[name]._y=waypoints[0][1];
	_root[name].tr=1;
	_root[name].onEnterFrame=function()
	{
		dx=waypoints[this.tr][0]-this._x;
		dy=waypoints[this.tr][1]-this._y;
		angle=Math.atan2(dy,dx);
		this._x+=levelSpeed*Math.cos(angle);
		this._y+=levelSpeed*Math.sin(angle);
		this._rotation=angle*180/Math.PI;
		if(Math.abs(dx)<3 && Math.abs(dy)<3)
		{
			if(this.tr==waypoints.length-1)
			{
				lives--;
				_root.lifeBox.life.text=lives;
				this.removeMovieClip();
			}
			this.tr++;
		}
            angle = Math.atan2(dist_y, dist_x);
            this._x = this._x+this.speed*Math.cos(angle);
            this._y = this._y+this.speed*Math.sin(angle);
            this._rotation = angle/Math.PI*180-90;
            if (bullet.hitTest(this._x, this._y, true)) {
                firing = false;
                bullet.removeMovieClip();
                this.removeMovieClip();
            }
            if (placed) {
                distance_from_turret_x = base._x-this._x;
                distance_from_turret_y = base._y-this._y;
                if ((Math.sqrt(distance_from_turret_x*distance_from_turret_x+distance_from_turret_y*distance_from_turret_y)<base_range/2) and (!firing)) {
                   firing = true;
                   bullet = attachMovie("bullet", "bullet"+_root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:base._x, _y:base._y});
                    bullet.dir = Math.atan2(distance_from_turret_y, distance_from_turret_x);
                    bullet.onEnterFrame = function() {
                        this._x -= 3*Math.cos(bullet.dir);
                        this._y -= 3*Math.sin(bullet.dir);
                        if ((this._x<0) or (this._y<0) or (this._y>640) or (this._x>480)) {
						firing = false;
                        this.removeMovieClip();
                        }
                    };
                }
            }
        };
    }
base.onEnterFrame = function() {
    if (!placed) {
        this._x = _root._xmouse;
        this._y = _root._ymouse;
        _root.range._alpha = 100;
        can_be_placed = true;
        if (_root.cant_build.hitTest(this._x-this._width/2, this._y-this._height/2, true) or _root.cant_build.hitTest(this._x+this._width/2, this._y+this._height/2, true) or _root.cant_build.hitTest(this._x+this._width/2, this._y-this._height/2, true) or _root.cant_build.hitTest(this._x-this._width/2, this._y+this._height/2, true)) {
         _root.range._alpha = 0;
           can_be_placed = false;
     }
    }
};
range.onEnterFrame = function() {
    if (!placed) {
        this._x = _root._xmouse;
        this._y = _root._ymouse;
    }
};
onMouseDown = function () {
if (can_be_placed) {
        placed = true;
    }
};
so far that has the following:

1. Creatures moving through the points
2. A turret that fires and can be placed
3. A life bar that goes down when a creature gets to the last waypoint without being killed

but i have a problem. i want to add in the code so that the score box value goes up when a "creep" is destroyed. i have wrote the following code to do so:

Code:
			{
				totalScore++;
				_root.scoreBox.points.text=totalScore;
				this.removeMovieClip();
			}
but i am not sure where i should add it to add 1 point onto the score when a "creep" is destroyed or the instance in which has to happen for it to run that code

the lives one was easy as this is the code for that:

Code:
		{
			if(this.tr==waypoints.length-1)
			{
				lives--;
				_root.lifeBox.life.text=lives;
				this.removeMovieClip();
			}
			this.tr++;
		}
all that does it change it so that when their is no way points left the "creep" vanishes and one life is taken off. can anyone help me sort out where to put the code for the score and what instance i should use?

Thanx,
big JME