Accessing Embedded TextBoxes After Duplication

Hi, I am reasonably new to AS3 and would appreciate it if someone could help me solve this problem. I am trying to change the text in a dynamic text box after it has been duplicated and given a name.
Heres how it works:
The text box is in the library inside a movieclip.
Using a loop this is then duplicated from the library (class: name_score).
It is then given a name and added to a movieclip already on the stage called drawSkeleton.
After the loop another loop is used to get the movieclip holding the two textboxes, name_txt and score_txt.
I then change the text using the code at the bottom which gives this error:
Access of possibly undefined property score_txt through…

Here is a simplified version of the code, without the loops:


[COLOR=black]var tempNS:DisplayObject=new name_score;[/COLOR]
[COLOR=black]tempNS.name="namescore3";[/COLOR]
[COLOR=black]drawSkeleton.addChild(tempNS);[/COLOR]
[COLOR=black]var currentDrawSection:DisplayObject = drawSkeleton.getChildByName("namescore3");[/COLOR]
[COLOR=black]currentDrawSection.score_txt.text="Hello World";[/COLOR]

When testing different versions of the code i tried this:

var tempNS:DisplayObject=new name_score;
[LEFT]tempNS.name="namescore3";
drawSkeleton.addChild(tempNS);
var currentDrawSection:DisplayObject = drawSkeleton.getChildByName("namescore3");
currentDrawSection.score_txt.x=1000;
//difference is here[/LEFT]

[LEFT]Which also failed, so then i tried this:[/LEFT]

var tempNS:DisplayObject=new name_score;
[LEFT]tempNS.name="namescore3";
drawSkeleton.addChild(tempNS);
var currentDrawSection:DisplayObject = drawSkeleton.getChildByName("namescore3");
currentDrawSection.x=1000
//difference is here[/LEFT]

Which worked. It obviously doesn’t like me trying to reach the text box inside the displayObject.

Like I said i’m pretty much a newbie to AS3 so any corrections to my code would be appreciated, and any help regards to my problem would be much appreciated.