6 Replies Latest reply on Dec 10, 2006 5:40 PM by shikozel

    calling a specific frame within a loaded movie clip

    sol_martin
      I know it's possible using the goto commands to call specific frames, and I'm wondering if it is possible to call a movie to the _root level and then target a loaded clip, then a frame inside said clip?

      ex: inside mc1, you want to click a button to follow this path - go to the _root, load mc2, but load it at frame 2.

      I hope that makes sense.
        • 1. Re: calling a specific frame within a loaded movie clip
          Level 7


          sol martin wrote:
          > I know it's possible using the goto commands to call specific frames, and I'm
          > wondering if it is possible to call a movie to the _root level and then target
          > a loaded clip, then a frame inside said clip?
          >
          > ex: inside mc1, you want to click a button to follow this path - go to the
          > _root, load mc2, but load it at frame 2.

          To target already loaded content you would use:
          1. swf loaded in level 123, targeting mc call MC1

          _level123.MC1.gotoAndPlay("some label");

          2. swf loaded in movie clip holder call "holder"
          _root.holder.MC1.gotoAndPlay("some label");

          Loading and going to frame is more tricky because the content need to
          be cached in order for you to be able to jump frames. It might work while
          authoring because computer process these files quickly but online, when
          you load it off the server it could fail.
          You need to create some preloader to assure that the file is fully loaded
          before you target its frames. Than you can make the LoadMovie call and pass
          some parameter to that the frame you need.
          Here is one example for such action, even tho it's Flash MX, the general
          idea is same:
          http://www.bokelberg.de/actionscript/23.html




          --
          Best Regards

          Urami


          --


          <urami>
          If you want to mail me - DO NOT LAUGH AT MY ADDRESS
          </urami>
          • 2. Re: calling a specific frame within a loaded movie clip
            shikozel Level 1
            what is the reason to do such a thing? what are you trying to accomplish
            • 3. calling a specific frame within a loaded movie clip
              sol_martin Level 1
              best way to describe it is at the source: http://www.fuzzyduck.ca/new.html (any mod can delete this after solving the problem)

              if you click a loaded bottle, a page will load. after you click the exit button on the bottle, which doesn't work right now, originally it would reload the whole page, and have the bottles pop up on the page again. I want it to simply call the spot where the bottles are sitting on the page at the last frame.

              it takes a couple clicks, but the red bottle does what I'm referring to.
              • 4. Re: calling a specific frame within a loaded movie clip
                sol_martin Level 1
                quote:

                Originally posted by: Newsgroup User

                To target already loaded content you would use:
                1. swf loaded in level 123, targeting mc call MC1

                _level123.MC1.gotoAndPlay("some label");




                I don't know if I'm correctly doing this right, so I'll post what I am doing. I'm assuming when you give the label, it's in the <frame label> box. The code I have currently is this:

                _level0.bottleInfo.gotoAndPlay("bottleInfoEnd");

                would that be right if the bottle info clip is located at the movie's bottom level?
                • 5. Re: calling a specific frame within a loaded movie clip
                  Level 7

                  > I don't know if I'm correctly doing this right, so I'll post what I am doing.
                  > I'm assuming when you give the label, it's in the <frame label> box. The code I
                  > have currently is this:

                  That is correct. Best is to make new layer on top of all the other layers in timelines.
                  There you just keep the actions and labels. It's easy to find and neatly organized when
                  you need to change something later.

                  > _level0.bottleInfo.gotoAndPlay("bottleInfoEnd");
                  >
                  > would that be right if the bottle info clip is located at the movie's bottom
                  > level?

                  Level zero is always the main movie, you could use _level0. or _root. as long as the
                  movie is on the main timeline it should work.
                  Now, you CAN'T target movie clips that are not present on timeline at the moment the
                  action is executed. So it won't work if the clip is in another scene. You will need to
                  target the frame first to get to that frame than the movie clip.

                  --
                  Best Regards

                  Urami


                  --


                  <urami>
                  If you want to mail me - DO NOT LAUGH AT MY ADDRESS
                  </urami>
                  • 6. Re: calling a specific frame within a loaded movie clip
                    shikozel Level 1
                    It seems like there is a simple solution to that (unless i dont fully understand the problem)

                    you can do that:
                    1. load the page
                    2. when someone click on a bottle you load on external swf on one an emty movie clip
                    ex:
                    _root.createEmptyMovieClip("holder")
                    _root.holder.loadMovie("youMovie.swf")

                    3. when someone click on closing the movie you juast remove the movie clip on the holder
                    _root.holder.removeMovieClip()

                    I hope this answer the question