2 Replies Latest reply on Sep 21, 2006 11:19 AM by Angyl

    BASIC Data Storage

    Angyl Level 1
      What's the BASIC way to store data inputted by a user into an input field?

      Like if I have a box and "please input your name" next to it and someone types "Johnny Fairplay" and presses enter, what's the code to take that name and hold on to it for later (where I will send it via PHP but I have that part down already)?
        • 1. Re: BASIC Data Storage
          Rothrock Level 5
          BASIC? This is a forum for Actionscript, not BASIC. :)

          You wouldn't have a box to input the name you would have an input textField. When you check out the help files for textField class you will see there is a text property of the textField. With that you can get the value of the input anytime you want.

          trace("The user input: "+userName.text);
          currentName=userName.text;
          //and so forth

          Depending upon what exactly you are doing that info could be put into an array or an XML object and so forth, but those are a bit more advanced usages.

          However if you need to wait until the user has entered something there are events for that. Again check the help files for the textField class.
          • 2. Re: BASIC Data Storage
            Angyl Level 1
            Thanks!