Skip to main content
Participant
April 16, 2007
Answered

Flash MX Event Handling Issues

  • April 16, 2007
  • 1 reply
  • 259 views
I'm looking for something that is quite basic in function: I want to have an input text field only allow numbers 0-9 (one character only.)Then I need to have an output dynamic text field show this information.

For example: I type 5 in the input text field. I then want to see "Thanks for choosing 5 as the magic number" in the output dynamic field. (This must be live... I don't want to force the user to press a button to "preview" their entry.)

I'm sure I could use an event handler, trace and the like, but I have no clue on how to. I'm using Flash 6 (aka: MX)
Any help would be greatly appreciated. 🙂
This topic has been closed for replies.
Correct answer kpsidekick
Thanks Brenda! That worked really well! :)

PROBLEM SOLVED!

1 reply

Known Participant
April 16, 2007
Perhaps this might work for you:

Create an input text box and give it an instance name of inputTB

Create a dymanic text box and give it an instance name of dynTB

On the first frame place the following code:

if(inputTB.text=="" || inputTB.text==null) {
dynTB.text = "";
}
else {
dynTB.text = "Thanks for choosing " + inputTB.text + " as the magic number"
}

On the second frame place this code:

gotoAndPlay(1);

I've tested it and it works great!!

Brenda
kpsidekickAuthorCorrect answer
Participant
April 17, 2007
Thanks Brenda! That worked really well! :)

PROBLEM SOLVED!