6 Replies Latest reply on Feb 12, 2007 12:52 PM by kglad

    Unload movie located in root

    Level 7
      I have loaded "list.swf" into the root from a button like so:

      on (release) {
      if(this._root == Number(this._root)){
      loadMovieNum("list.swf",this._root);
      } else {
      this._root.loadMovie("list.swf");
      }
      }

      In "list.swf" I have a another movie that loads from top of the actionscript
      frame like this:
      loadMovieNum("scrollonly.swf", 1);

      How can I unload "list.swf" (that's in the root), from scrollonly.swf?

        • 1. Re: Unload movie located in root
          kglad Adobe Community Professional & MVP
          it that's in your _level0 swf use unloadMovieNum(0) which should pretty much shut down everything and so is probably not what you want to do.

          btw, your if-statement will never resolve to true so you may as well remove it. and if it did resolve to true you're not doing anything other than loading into _root anyway.
          • 2. Re: Unload movie located in root
            Level 7
            Thanks for your response.
            yes your right, don't want to use use unloadMovieNum(0).
            So instead, I would like to move the playhead in list.swf which is in _root
            to a blank frame, 2 .
            I tried
            _root.gotoAndStop(2); in scrollonly.swf
            but list.swf won't go. No effect.

            "kglad" <webforumsuser@macromedia.com> wrote in message
            news:eqo699$meg$1@forums.macromedia.com...
            > it that's in your _level0 swf use unloadMovieNum(0) which should pretty
            > much
            > shut down everything and so is probably not what you want to do.
            >
            > btw, your if-statement will never resolve to true so you may as well
            > remove
            > it. and if it did resolve to true you're not doing anything other than
            > loading
            > into _root anyway.
            >

            • 3. Re: Unload movie located in root
              Level 7
              This worked:
              _level0.gotoAndStop(2);

              I had tried:
              _root.gotoAndStop(2); in scrollonly.swf
              but list.swf won't move to frame 2. No effect.

              Not sure what the difference is between the two.
              • 4. Re: Unload movie located in root
                kglad Adobe Community Professional & MVP
                _root refers to the main timeline of the _level in which it is used.

                so, if you used _root in the _level0 swf, it refers to the _level0 timeline. when you use _root in a _level1 swf (like scrollonly.swf), it refers to the main timeline in _level1.

                _level0 always refers to the main timeline in _level0 no matter where it is used. and _level1 refers to the main timeline in _level1 (if it exists) no matter where it is used.
                • 5. Re: Unload movie located in root
                  Level 7
                  kglad,
                  Thanks for the explanation. Understand now.

                  _root refers to the main timeline of the _level in which it is used.

                  so, if you used _root in the _level0 swf, it refers to the _level0
                  timeline.
                  when you use _root in a _level1 swf (like scrollonly.swf), it refers to the
                  main timeline in _level1.
                  _level0 always refers to the main timeline in _level0 no matter where it is
                  used. and _level1 refers to the main timeline in _level1 (if it exists) no
                  matter where it is used.

                  • 6. Re: Unload movie located in root
                    kglad Adobe Community Professional & MVP
                    you're welcome.