2 Replies Latest reply on Sep 26, 2006 2:31 AM by Peter Lorent

    Storing user input into a variable

    leewilson86 Level 1

      i dont know why but flash is being a pain!!

      what i am doing should work as i have done pretty much as it says from the official actionscript mx 2004 book.

      Basically i am using the following code:

      enter_btn.onRelease = function() {
      forename = forename_txt.text;
      surname = surname_txt.text;
      gQuestionNum = 1;

      this script is written so that when i press the enter button the values entered into the forename_txt and surname_txt fields should be stored in their respective variables (forename and surname).

      however when i use the following code on the next frame:

      name_txt.text = forename + " " + surname;

      to display the forename variable and the surname variable into the name_txt field, it says UNDEFINED!!

      what am i doiong wrong??

      i know this is probably a simple thing to do but its normally the simple thing which makes you wanna chuck your computer out the window!!

      please help if you can,

      thank you and all replies will be much appreciated.

      thanks again