Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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.

share|improve this question
why don't you just do it all on one frame? – Ronnie Oct 29 '12 at 22:57

2 Answers

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
}
share|improve this answer
Thank you so much for your quick reply, I will try this. – johnscott1989 Oct 29 '12 at 23:40
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 0:23

//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; 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.