5 Replies Latest reply on Jun 5, 2009 3:32 PM by Ned Murphy

    Accessing another timeline

    scorptique

      Hey guys.

      How to access the timeline of a movieclip from inside ANOTHER movieclip (both MCs are placed on the root timeline BUT in different frames)

      (if not possible, AS3 instead?)

        • 1. Re: Accessing another timeline
          Ned Murphy Adobe Community Professional & MVP

          If by different frames you mean they don't exist together at any point, they cannot communicate between each other.  You would need to store information in the main timeline for one or the other to pick up on when they appear.

           

          If they do exist at the same time, then you can use _parent.otherMCName to communicate from one to the other.

          • 2. Re: Accessing another timeline
            scorptique Level 1
            You would need to store information in the main timeline for one or the other to pick up on when they appear.

             

            Hmm, can you give an example? im not quite sure what you mean.

            • 3. Re: Accessing another timeline
              Ned Murphy Adobe Community Professional & MVP

              If one mc lives only in frame 5 and the other mc only lives in frame 10, then there is no way they can talk to each other because they don't exist at the same time.  So you would essentially need to use the main timeline as a middleman to tell one movieclip what the other movieclip wants to tell it.  You would have the one movieclip store values in the main timeline, and the other movieclip would need to be coded to check those values.

               

              Think of it as an answering machine... each movieclip has to check the main timeline to see if any messages were left for it.

              • 4. Re: Accessing another timeline
                scorptique Level 1

                so I should..dispatch an event?

                • 5. Re: Accessing another timeline
                  Ned Murphy Adobe Community Professional & MVP

                  Not by what I am describing, but so far I'm assuming I am understanding the scenario correctly.  You should have code in whichever movieclip was expected to get information from the other, code that checks to see what that information is as soon as you get to the frame where that movieclip is.  You shouldn't need an event, just code in its first frame that collects values from the main timeline when it needs that data.