Problem with TextBox, any help?

I have the following problem:

I create a box with the lineTo command and I want to create there a text box (depending on box width). I’m trying using the following code, but it doesnt seem to work well… I generate the box, but I’m unable to see the text…

//formatText - a TextFormat object
createEmptyMovieClip("buttonTest",0);
buttonTest.lineStyle(1,0xFFFFFF,100);
buttonTest.moveTo(x,y);
buttonTest.beginFill(0x006600,100);
buttonTest.lineTo(x+itemLength,y);
buttonTest.lineTo(x+itemLength,y+20);
buttonTest.lineTo(x,y+20);
buttonTest.lineTo(x,y);
buttonTest.endFill();
buttonTest.createTextField("textBox", i+1, x, y, x+itemLength, y+20)
textBox.setNewTextFormat(formatText);
//Reads current node (XML file) and prints to text field
textBox.text = currentNode.attributes.name;