0

I have 3 InputText boxes and a submit button on frame 1. When clicking submit i have a dynamic text box on frame 2 with a button that says "next" on it.

I need the dynamic text box on frame 2 to display whatever is inputted in the inputText boxes on frame 1 one after the other when clicking the "next" button that's on frame 2.

I don't know if I have to do anything with Arrays or anything like that, I'm pretty new to this so any help would be much appreciated.

Thank you so much in advance.

2 Answers2

0

On a single frame rather than two..for example:

nextBtn.addEventListener(MouseEvent.CLICK, verifyInfo);

function verifyInfo(e:MouseEvent):void
{
    field1.visible = false;
    field2.visible = false;
    field3.visible = false;
    myDynamicTextField.text = field1.text + '\n' + field2.text + '\n' + field3.text; // \n is just a new line
}
Ronnie
  • 11,138
  • 21
  • 78
  • 140
  • And I didnt choose one frame because I'm actually doing this for a game, the inputtext fields will be name inputs and then each frame that appears will make the next name appear, it's like a turn based task game. The frames that appear are generated randomly too. – johnscott1989 Oct 30 '12 at 00:23
0

//Frame 1 coading.......

submitButton1.addEventListener(MouseEvent.CLICK,onSumbitBtnClick);

function onSumbitBtnClick(event:MouseEvent):void
{

gotoAndStop(2);

}

//Frame 2 coading.......

var txt1:String = MovieClip(root).inputText1.text + "\n";

var txt2:String = MovieClip(root).inputText2.text + "\n";

var txt3:String = MovieClip(root).inputText3.text;

myDynamicTextField.text = txt1 + txt2 + txt3; 
Ashish
  • 16