Copy link to clipboard
Copied
How can I get the user's input to display in a dynamic field on another frame. I have a text input field and a button that goes to the next frame. When I debug the program, I want the user to enter their custom name and then that name will display in a dynamic text field on multple frames.
I tried multiple methods but the dynamic text field displayed:
.undefined
if your input textfield has instance name input_tf, you can copy and paste the following into the first keyframe that contains input_tf:
var inputTextString:String;
input_tf.onChanged=function(){
inputTextString=this.text;
}
Copy link to clipboard
Copied
save the text in a variable and use that variable in your other frame:
// after text input is entered (eg, using onChanged handler)
var inputTextString:String = input_tf.text;
// then from any frame on that timeline (after the above code executes), you can use inputTextString to retrieve the text from input_tf even though input_tf may no longer exist.
Copy link to clipboard
Copied
So I can just copy this code:
var inputTextString:String = input_tf.text;
and place it into the actionscript for the frame with the inputtext field?
Copy link to clipboard
Copied
if your input textfield has instance name input_tf, you can copy and paste the following into the first keyframe that contains input_tf:
var inputTextString:String;
input_tf.onChanged=function(){
inputTextString=this.text;
}
Copy link to clipboard
Copied
Okay. Then what code would I use to make that textput display in a dynamic field on another frame?
Copy link to clipboard
Copied
:
dynamic_tf.text=inputTextString;
Copy link to clipboard
Copied
THANKS SO MUCH!!!!!
IT WORKED!!
Copy link to clipboard
Copied
you're welcome.
Copy link to clipboard
Copied
This is exactly what I am trying to do also. Is it possible to get a screen shot of your action script so i can see this working. I am still having issues with mine.
Many Thanks
Copy link to clipboard
Copied
because this thread is so old, the op is not likely to respond.
so, if they fail to respond, start a new thread.
Copy link to clipboard
Copied
I didn't respond because the file I had with this code on it was deleted. I'm sorry.
Starting another discussion would be easier. But I have another file similar to the previous one. I can see if I can put the code on it, if you are willing to wait a day or two.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now