You determine the width of the mc and the width of the textfield and use the _x property of the mc to determine where to place the _x property of the textfield. The _x property of the textfield should be...
tf._x = mc._x + ((mc._width - tf._width)/2);
(assuming the mc registration is to its left side)
not sure why? didn't work.
createTF(_root.ab_mc._x + ((root.ab_mc._width - root.ab_mc.new_mc.tf._width)/2));
}//this piece of code is in another movieclip
Also how do I add the ._y property here?
Message was edited by: Ron Colmen
I have no idea what your createTF function does, so I cannot tell why it won't.
var tl:MovieClip = this;
var tf_mc:MovieClip = tl.attachMovie("tfID1.tf_mc_"+textNum++,tl.getNextHighestDepth());
Your function doesn't appear to make use of any of the parameters you are passing to it, nor even to create a textfield. It seems like you can't get something working because you haven't done anything to get it working. Try looking up the createTextField method in the Flash help documentation if you want to see how to create a textfield dynamically and how to place it where you want it to be.