4 Replies Latest reply on Dec 15, 2008 8:06 AM by graphix75

    Navigating the Timeline from Movieclip

    graphix75 Level 1
      Hi there

      I'm hoping someone can help me with this. I have created a scrolling image gallery in Flash which works fine from the Timeline (Scene 1). Now I am using it inside a movie clip called gallery I need to know how to get it to load the images into the main loading area now that it is within a movie clip. The code that makes the images load into the loading area at the moment is this

      on(press){
      _root.the_entire_gallery.gotoAndPlay("pic5");
      }

      I'm assuming that now it is inside a movie clip I need to add something other than _root. to get it to access the images but I don't know what. I've tried _parent but to be honest I'm clutching at straws as I don't really understand what it does.

      Hope someone can help.

      Thanks
        • 1. Re: Navigating the Timeline from Movieclip
          robdillon Most Valuable Participant
          Is this correct: the movieclip "the_entire_gallery" is inside a movieclip named "gallery"?
          Where is the code that is loading the images? On the main timeline, or in the movieclip "gallery"?
          If "the_entire_gallery is inside "gallery" and the code is on the main timeline and you are loading in the images into individual movieclips in "the_entire_gallery" then, the path to each clip is gallery.the_entire_gallery.clipName .
          If you need to communicate from one of these clips to the main timeline the you can use _root, or _parent._parent.
          • 2. Re: Navigating the Timeline from Movieclip
            graphix75 Level 1
            Hi there

            I have tried both the solutions you suggested without any luck. Is there a way I can send you a copy of the fla and you will be able to see how it is set up?

            Perhaps a simpler example is the button inside the gallery movieclip, this doesn't work from inside here either it has the following code on it ...

            on (press) {
            _root.gotoAndStop("sketchbook");
            }


            ...that let's it work from the main timeline but now that the frame label "sketchbook" is inside the gallery movieclip how do I get it to reference that because nothing is happening as I take it _root. is pointing it to the main timeline?

            I have tried on (press) { gallery.gotoAndStop("sketchbook");
            }

            I know it all works if I don't put it into a movieclip but I want to have everything neat and tidy on the timeline. It would really help to be able to send you the fla.

            Thanks, Jo
            • 3. Re: Navigating the Timeline from Movieclip
              graphix75 Level 1
              Hi there

              I have tried both the solutions you suggested without any luck. Is there a way I can send you a copy of the fla and you will be able to see how it is set up?

              Perhaps a simpler example is the button inside the gallery movieclip, this doesn't work from inside here either it has the following code on it ...

              on (press) {
              _root.gotoAndStop("sketchbook");
              }


              ...that let's it work from the main timeline but now that the frame label "sketchbook" is inside the gallery movieclip how do I get it to reference that because nothing is happening as I take it _root. is pointing it to the main timeline?

              I have tried on (press) { gallery.gotoAndStop("sketchbook");
              }

              I know it all works if I don't put it into a movieclip but I want to have everything neat and tidy on the timeline. It would really help to be able to send you the fla.

              Thanks, Jo
              • 4. Re: Navigating the Timeline from Movieclip
                graphix75 Level 1
                Hi there

                By some small miracle I've just solved this. The button didn't need _root. at all because it was inside gallery movieclip. Each button needed _parent. before it to goto the movieclip with the loader frames and that worked!

                Great!

                Thanks for your assistance.

                Jo