Spacing dynamic text widths

Hi there,

I would like to determine the exact spacing of the textfields for my xml file so I get a result for my horizontal nave like: home/ features/ work/ etc.

Now I have something like this:

GenerateMenu = function (container, name, x, y, depth, node_xml) {
var curr_node;
var curr_item;
var curr_menu = _root.container;

for (var i = 0; i<node_xml.childNodes.length; i++) {
	curr_item = curr_menu.attachMovie("beh", "item"+i+"_mc", i);
	curr_item._x = x+i*spacing;
	curr_item.i = i;
	curr_item._y = y;

//beh(export name) is the movieclip attached to the mc container. In the mc with export name "beh’ I have a textfield with the name ‘name’.

This is what I tried to create the space with no result: = true; +10;

Can someone help me out. Thx