2 Replies Latest reply on Sep 30, 2011 11:21 AM by rmt713

    Need Help Removing Empty Movie Clip

    rmt713

      I created a movie clip of a photo gallery that works fine until I test it and get to the frame that the movie clip is on.  After doing so, the movie clip stays throughout any other page I click on.  I can't get the removeMovieClip function to work.  help please!!

       

      Here's the code I have:

       

      this.createEmptyMovieClip("container",1);

      var imagesNumber:Number = 5;

      for (i=1; i<=imagesNumber; i++) {

      container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);

      myThumb_mc = container["thumb"+i+"_mc"];

      myThumb_mc._x = 175

      myThumb_mc._x = (i-1)*myThumb_mc._width + 175;

      myThumb_mc._y = (Stage.height-myThumb_mc._height)/2

      myThumb_mc._alpha=50;

      myThumb_mc.largerImage = i;

      myThumb_mc.onRollOver = function(){

      this._alpha=100;

      }

      myThumb_mc.onRollOut = function(){

      this._alpha=50;

      }

      myThumb_mc.onRelease = function(){

      _root.attachMovie("image"+this.largerImage,"large_mc",2);

      large_mc._x = (Stage.width - large_mc._width)/2;

      large_mc._y = (Stage.height - large_mc._height)/2;

      large_mc.onRelease = function(){

      this.removeMovieClip();

      }

      }

      }

        • 1. Re: Need Help Removing Empty Movie Clip
          Ned Murphy Adobe Community Professional & MVP

          If the container is the one you want to remove, another way to resolve the problem is to not create the container dynamically, but instead add it to the timeline in the frame as an empty movieclip.  That way when you leave the frame you leave the container behind.

          1 person found this helpful
          • 2. Re: Need Help Removing Empty Movie Clip
            rmt713 Level 1

            Thank you, I almost have it.  Now the only issue is my larger images.  When I click on the thumbnails they respond and show the larger image, but once clicked again the larger image will not disappear.  It also then has the original issue and remains throughout the rest of the scene.