Skip to main content
Known Participant
January 10, 2013
Question

Adobe CS5 Question

  • January 10, 2013
  • 2 replies
  • 1248 views

 

How do I make the user's text input appear in a text box on another frame?

This topic has been closed for replies.

2 replies

robdillon
Participating Frequently
January 10, 2013

You can extend the input textfield object to that other frame, and then move the input text object off the visible area of the stage for the frames in between. Another method is to put that text into a new dynamic textfield in new frame. You can get at the text that the user entered from the text property of the input textfield.

qwerty245Author
Known Participant
January 10, 2013

Can you explain the second option more? I understand creating the dynamic text field but not the sentence after that.

How can I get the text from the text property of the input textfield.

robdillon
Participating Frequently
January 10, 2013

Give the input textfield an instance name. After the user has entered their information, store the instance name text property in a variable. Then use the value stored in that variable as the text property for the dynamic textfield.

Let's say the input textfield's instance name is "userName". And the dynamic textfield's instance name is "useThisName". Let's also say that you have a button to move the user to the next screen or to indicate that they are finished entering information. Let's call that button instance "moveAhead".

On the frame where the user is entering information, you can put something like this:

var theUserName:String;

moveAhead.addEventListener(MouseEvent.MOUSE_UP, moveOn);

function moveOn(event:MouseEvent):void {

    gotoAndPlay('some marker name');  // or something like that...

    theUserName = userName.text;

}

then at the frame where you want to use the user input:

useThisName.text = theUserName;

Does that help?

January 10, 2013

Can you please explain it, do you want the value of that input text box to show in another text box in another frame..

Vipul

qwerty245Author
Known Participant
January 10, 2013

Yes that's exactly it. I have the user input the name of a character and then that name will appear on another frame in a text box. How would I approach this with? Actionscript or just using regular tools in Adode Flash?