2 Replies Latest reply on Apr 17, 2007 12:06 PM by kpsidekick

    Flash MX Event Handling Issues

    kpsidekick
      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. :)
        • 1. Flash MX Event Handling Issues
          "B" Level 1
          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
          • 2. Re: Flash MX Event Handling Issues
            kpsidekick Level 1
            Thanks Brenda! That worked really well! :)

            PROBLEM SOLVED!