PDA

View Full Version : MX multiple strings to dynamic textfield



SueS
February 12th, 2005, 05:12 PM
I have multiple mc's that contain input textfields. I want the results of these to appear one after another in the same dynamic textfield. Later they will be sorted alphabetically.

So far, I've been able only to get one item to appear at a time in the dynamic textfield--the next item replaces the first. A for loop didn't work.

Can anyone point me in the right direction to get the new text string to be added to the previous text string rather than to replace the first text string?

Anything at all similar I've seen creates a shared object instead of writing multiple strings to one dynamic text field.

Thanks for any help you can give me.

pou-pou
February 12th, 2005, 05:32 PM
in your for loop you are using mytxt.text = something; right?
try mytxt.text += something; instead ;)

added: if they are all in one long line try mytxt.text += something+"\n";

SueS
February 12th, 2005, 06:38 PM
Thank you soooo much. I can't believe I missed this (I'm new enough at Actionscripting that I'm busy looking for a fly when I should be seeing the elephant right in front of me!).

Thanks again.