PDA

View Full Version : How do I input text from an input text field into a dynamic text field in next frame?


ScarletSniper
06-29-2008, 05:36 PM
Hi!!
I could appreciate a little help here. My problem is that I'm working on an RPG, and I have it where you input the character's name in the text field, only to find that when I enter anything in the input text field, on the next page, the dynamic text field says 'undefined'. I've tried some of the advice here from other users, but nothing will load up on my Flash 8. I've even uploaded what I'm working on with my computer, so you can see the problem.
My question is that how do I display the input text field name on the other Flash frames instead of that one word: 'undefined'. I've even got a book on Flash 8 and tried everything, but I only receive ActionScript errors.

Any help would be greatly appreciated!!
ScarletSniper

neilmmm
06-29-2008, 09:15 PM
you need a variable to hold your input string

frame one change it to

stop();
var char_name:String;
this.NameButton.onPress = function()
{
char_name=tCharacter1Name.text;
gotoAndStop(2);
}

and on frame 2

change it to

stop(); {
tWelcome1Name.text = char_name;
}

ScarletSniper
06-29-2008, 10:49 PM
Hey!!
Thanks for the help, Neil. I owe you one. It worked perfectly.

Two Thumbs Up!!
ScarletSniper

neilmmm
07-01-2008, 10:41 AM
yw