3 Replies Latest reply on Mar 24, 2010 4:50 AM by Ned Murphy

    Pass value from one layer to another.

    Zeeek_90 Level 1

      Hey,

       

      Is it possible to pass a value from one layer to another.

       

      I have a text that I'll get from layer 1 and I want to pass the value to a TextArea in layer 3.

       

      Is it possible, anyone?

       

      Thanks.

        • 1. Re: Pass value from one layer to another.
          Ned Murphy Adobe Community Professional & MVP

          Unless the picture I got of what you want is wrong, you can take text and assign it to any text element that is present in the current frame.  Which layers things reside in is irrelevant as long as they are both present.  So if you have a textfield (tField) and a textarea (tArea) on different layers, you can use...

           

          tArea.text = tField.text.

          1 person found this helpful
          • 2. Re: Pass value from one layer to another.
            Zeeek_90 Level 1

            Do the value of an textarea become null when i go to another layer?

             

            Because I know that this should works but it isn't. Really puzzles me.

            • 3. Re: Pass value from one layer to another.
              Ned Murphy Adobe Community Professional & MVP

              I cannot be sure what you are calling a layer is what I know to be a layer--normally one does not go to layers, one goes to different frames.  If you look at the timeline, it consists of frames and possibly multiple layers.  Every layer has the same number of frames, and content in frame 1 of one layer is accessible by content in frame 1 of any other layer.  So if you have a textfield in layer 1, frame 1, and you have a textarea in frame 1, layer 2, you can use code to have the text in one of those assigned to the other.

               

              If you show a picture of what you are trying to describe it may help.

              1 person found this helpful