4 Replies Latest reply on Sep 29, 2009 11:15 AM by Rothrock

    removeMovieClip()

    MarionMacDonald

      I'm having a problem with removeMovieClip() which I know is simple but I'm not latching onto it.

       

      At the _root level, I'm using this to create a new movie clip:

      this.createEmptyMovieClip("containerMin1A", 325);

       

      I have a number of these movie clips, so when I want to remove them all, I put them into an array like so:

      var arrContainers = new Array("containerMin1A", "containerMin1B", "containerMin1C", "containerMin1D", "containerMin1E", "containerMin1F");

       

      They are actually removed when the user clicks the Home button

      on (release) {

         _root.containerSubMenu.removeMovieClip();            - this works
         for (var j=0;j<_root.arrContainers.length; j++) {

            _root.arrContainers[j].removeMovieClip();              - this doesn't work

         }
         _root.gotoAndPlay("mainMenu");                            - this works
      }

       

      I've tried loads of variations.  I suspected it had something to do with the level but trace() suggests that _root is correct.   I then suspected it had to do with removeMovieClip() looking for a string to I tried converting _root.arrContainers[j] but that didn't work either.

       

      Help appreciated.