Problem with setting text in an object

I am working on a game, and have some characters set with lil boxes that should show their names and stats. I set the boxes like this, and this works fine:


character.prototype.statsBox = function(depth,x,y,name,HP,MP)	{
	this.depth = depth;
	this.x = x;
	this.y = y;
	this.name = name;
	this.HP = HP;
	this.MP = MP;
	this.statsClip = _root.attachMovie("stats_mc", "statsBoxMC", this.depth, {_x:this.x,_y:this.y});
};

I want to then set the stats for each character as it’s box is placed. I added this to the end of the prototype.


this.nameBox_mc.playerName_txt.text = this.name;

It doesn’t work. I could just go in and set the code for each character in a function after setting them, but it would be better if it were set when the boxes are set.

Okay I worked some more with it and still nothing. I think it’s the way I’m thinking about it:
The movieclip is attached to enemy, so it should be enemy.statsClip, correct?
then the statsclip (comprised of clips named as so: stats_mc->nameBox_mc->playerName_txt [-> means nested in clip]).
So i should be able to call enemy.statsClip.nameBox_mc.playerName.txt.text correct? Also, these are named in the instance name area, and I can’t member if I did this right, but I think I did.
And the clip (stats_mc) plays through about ten frames before it shows these mc’s, does that change anything? It shouldn’t cause the clip is placed and then stoped…
I know it’s confusing, but thanks!