I'm making a game in which the user can type their name, and later in the game it'll say something like:
"Oh, Kaitlyn, how was your day?" But all I really know how to do is make it so the name will appear but NOT be in an actually sentence. The problem with that is the spacing and punctuation. I tried following a tutorial which gave me this to put in the actionscript for the output box:
output_txt.text = "Hello "+myText+"!";
Here's the tutorial:
I think it's because it's for as3 that it doesn't work, but I'm kinda new to flash and it doesn't seem too difficult. Please give very discriptive instructions.
What you show will work in AS2 as well as AS3. Have you assigned an instance name to the textfield (it shows as ' output_txt ' in your example)? Instance names are assigned by selecting the object on the stage and entering the name in the Properties panel.
You need to store the name that the user enters into a variable. This can be done a couple different ways. Do you have something in place for that?