2 Replies Latest reply on Oct 29, 2008 4:21 AM by dfcareas

    Pass values between different frames

    dfcareas
      Dear Friends from Adobe.
      I need a lot of help from you.
      I have a project with Flash Action Script 2.0 and would like to know if you have to pass values between different frames. Example:
      Passing a value of a inputbox the frame 1 for a inputbox in frame 2.

      OBS: If possible could pass the solution through e-mail?
      Now, very grateful.
      Diogo Areas.

        • 1. Re: Pass values between different frames
          robdillon Most Valuable Participant
          Using AS2 you can either name the input textfield instance on the stage or, you can name the variable property of the input textfield. You can name either of these from the Property Inspector window. Once named, you can then have access to the value of the text that is entered. It will be either instanceName.text or variableName.

          The scope of either of these values lasts only as long as the textfield instance exists. So, if the first textfield is in frame 7, for instance, and is only in frame 7, and you want to use the value in another frame, say frame 20, then you'll have to store the value outside of the textfield for later use. You can do this by creating a variable in the first frame of the movie, and then placing the text from the textfield in frame 7 into that variable. Then at frame 20, you can retreive that value and use it in the textfield in frame 20.

          Alternately, you can continue the instance of the textfield in frame 7 out through frame 20. The content will continue to be available. You can add keyframes to the layer that the textfield is in at frame 7, and move the object off the visible area of the stage, so that it won't be seen, if you like.
          • 2. Re: Pass values between different frames
            dfcareas Level 1
            Rob.
            Thank you for the tip.
            See you next time.
            Diogo Areas.