Groups | Blog | Home
all groups > flash actionscript > august 2005 >

flash actionscript : dynamicaly generating Textfields


priqi
8/6/2005 9:05:18 PM
Hi

i made this program which draws circles and i want to put a label on each
circle which moves together with the circle when dragged and droped.
the circle receives its center coordinates from the user. Each time a new
circle is generated (by pushing a button) I want the user to be able to input a
label via input text(called labl)
the program looks like that:

_root.createTextField("tx",i,centerX,centerY,100,100);i++;
tx.type="dynamic";
tx.text=labl.text;


if I generate more than one circle the text changes the way the user inputs
but remains on the same location( as the first one)
and second the Textfield doesn't move with the circle.
I have tried :
_root.mclip.createTextField("tx",i,centerX,centerY,100,100);i++;
but like that it doesn't work at all

Do you hav any ideas on this one?

thanks a lot!
priqi

kglad
8/6/2005 11:21:41 PM
use:

yourCircle.createTextField(etc);
yourCircle.tx.text=labl.text;

priqi
8/7/2005 12:00:00 AM
Thanks a lot!

i was close... Thanks again!

kglad
8/8/2005 12:00:00 AM
AddThis Social Bookmark Button