3 Replies Latest reply on Jun 1, 2009 5:59 AM by iggyotis

    cant unload movies on two different levels?

    iggyotis

      Hi guys,

      I am having trouble with unload an loading movies. Basically I am loading a movie into a container, which works a charm:

      graphicsbut.onRelease = function() {

      _root.createEmptyMovieClip("container",1);
      loadMovie("Graphics/Graphics.swf","container");
      container._x = -22 ;
      container._y = 0 ;

      }

      And then I want to load another movie above this one, also working:
      Dyson_hit.onRelease = function()
      {
      Dyson_mc.gotoAndPlay("out");
      loadMovieNum("Graphics/Catwalks.swf", 2);
      disableBtns();
      }

      But NOW the problem....I want to unload them both when a close button is pressed on the third loaded swf?
      Also, ideally I would like to add that second movie clip into a container, so I can position it correctly, but when I try copying the code I use on the first, it doesn't seem to work...is it to do with the "root" bit perhaps?

        • 1. Re: cant unload movies on two different levels?
          iggyotis Level 1

          ahh I did it with this code:
          on (release) {
                _root.container.unloadMovie()
                unloadMovieNum(2);
                _level0.enableBtns();

          }

          I would still like to load the second swf into a container so if anyone can tell me how to do that, that would be great:-)

          • 2. Re: cant unload movies on two different levels?
            iggyotis Level 1

            ok, I seem to be able to load the next movie into a container with this:
            Elnett_hit.onRelease = function() {

                createEmptyMovieClip("container",1);
                loadMovie("Advertorial/Elnett/Elnett.swf","container");
                container._x = -22 ;
                container._y = 0 ;

            }

            • 3. Re: cant unload movies on two different levels?
              kglad Adobe Community Professional & MVP

              to load both into a container movieclip:

               




              graphicsbut.onRelease = function() {

              _root.createEmptyMovieClip("container",1);
              loadMovie("Graphics/Graphics.swf","container");
              container._x = -22 ;
              container._y = 0 ;

              }

              And then I want to load another movie above this one, also working:
              Dyson_hit.onRelease = function()
              {
              Dyson_mc.gotoAndPlay("out");

              _root.createEmptyMovieClip("container2",2);  // use higher depth and different name


              loadMovie("Graphics/Catwalks.swf", _root.container2);

              disableBtns();
              }

               

              and you can control movieclips loaded into _levels:  you must wait until loading is complete (ie, use preloader code or an mcl).