4 Replies Latest reply on Feb 24, 2008 9:21 AM by jak9942

    Populating text fields

    jak9942 Level 1
      I have an application that loads variables from a text file. It loads them into several dynamic text fields by using the variable property. I tried populating other text fields with these values but doesnt seam to work.
      i tried this.

      username.text = username;

      I tried this because i need the value of the variable "username" to appear in the username text field.

      Why didnt this work. How can i correct this?

      Thanks
        • 1. Re: Populating text fields
          Venian Level 2
          The username textfield must be a dinamic textfield also. You cannot load anything in a static text field. It must be dinamical or input textfield.

          Then you must be sure the variable from which you load the data is in the same timeline and frame as the textfield.

          So you should better target the variable with _root.

          username.text = _root.username;

          I hope this work if not post again and i will help you.
          • 2. Re: Populating text fields
            jak9942 Level 1
            The "username.text" is a textinput component, I didnt think that would make a difference. And the linkage is correct, i think. is there anyway of loading the variables straight into the username.text text input? I have seen a script on the net but i dont fully understand it. thanks for the help
            • 3. Re: Populating text fields
              Venian Level 2
              it's a component? Why do you need that? Create the username simply with a dinamic text field and assign the data to it.

              I think your missing something. from what i remember and i'm not so good at this ( i must first see an exemple of something made by me) you must have a variable which contains the variable in which the data is loaded.

              I have to check out first some work i did to remember. If problem not solved i will come back in a few hours with the answer.
              • 4. Re: Populating text fields
                jak9942 Level 1
                ok cheers! I dont know how to assign the variable to the textinput. I can easily get it to load into a dynamic text field but its a different story when trying to assign it to the textinput