3 Replies Latest reply on Jan 19, 2007 6:53 PM by Chunick

    Get TextInput value?

    pete@wiretree
      I have a text input field named TextInput, which is the 3rd member on my cast.

      The initial value of this control is 1.

      When I type a 7 (or any number) in the TextInput box, and then click a control with a mouseup event handler, the function fires:

      put member("TextInput").text
      put member(3).text

      both of which display 1 in the message output.

      How can I get the current value of the TextInput control?

        • 1. Re: Get TextInput value?
          Level 7
          pete@wiretree wrote:
          > I have a text input field named TextInput, which is the 3rd member on my cast.
          >
          > The initial value of this control is 1.
          >
          > When I type a 7 (or any number) in the TextInput box, and then click a control
          > with a mouseup event handler, the function fires:
          >
          > put member("TextInput").text
          > put member(3).text
          >
          > both of which display 1 in the message output.
          >
          > How can I get the current value of the TextInput control?
          >
          >
          >

          I'm not sure exactly what you're wanting, but if you want to press a
          button and have the text from, say, sprite 1 placed on the message
          board, then do something like this:

          on mouseup me
          member("TextInput").text = sprite(1).member.text
          put member("TextInput").text
          end
          • 2. Re: Get TextInput value?
            pete@wiretree Level 1
            quote:

            Originally posted by: Newsgroup User
            pete@wiretree wrote:
            > I have a text input field named TextInput, which is the 3rd member on my cast.
            >
            > The initial value of this control is 1.
            >
            > When I type a 7 (or any number) in the TextInput box, and then click a control
            > with a mouseup event handler, the function fires:
            >
            > put member("TextInput").text
            > put member(3).text
            >
            > both of which display 1 in the message output.
            >
            > How can I get the current value of the TextInput control?
            >
            >
            >

            I'm not sure exactly what you're wanting, but if you want to press a
            button and have the text from, say, sprite 1 placed on the message
            board, then do something like this:

            on mouseup me
            member("TextInput").text = sprite(1).member.text
            put member("TextInput").text
            end




            The TextInput has an initial value of 1. When the movie loads, there's a 1 in the TextInput box.

            While the movie is running, I change the 1 to a 2.

            I think click my button that runs the script put member("TextInput").text.

            Instead of a 2, which I would expect to see, I see a 1.

            Does this make sense? Why is this happening?

            Thanks!
            • 3. Get TextInput value?
              Chunick Level 3
              if you're using the flash component then the methods/properites should be called from the sprite and not the member... so, to get the current value from your textInput flash component it should be:

              put sprite(x).text -- where x is the number of the sprite that is the text input.