3 Replies Latest reply on Aug 12, 2011 2:50 PM by kglad

    Please help removing mc after createEmptyMovieClip


      Hello, first, sorry for my bad english. I know that there are loads of threads about this issue, but I googled it and tested all solutions I found, and nothing worked to me. I found some AS2 code for creating a XML dynamic photo gallery, with thumbnails and big selected image. I extended that for more than one gallery, and all worked well except one thing: when I load a gallery with, for example, 6 photos and return to one with 2, the difference of 4 thumbnails of the first gallery remains, so the problem is that I don't know how to remove the mc instances that I've created with createEmptyMovieClip function. The code of the function that creates every thumbnail is:


      function thumbnails_fn(k) {
          thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
          tlistener = new Object();
          tlistener.onLoadInit = function(target_mc) {
              target_mc._x = hit_left._x+(target_mc._width+5)*k;
              target_mc.pictureValue = k;
              target_mc.onRelease = function() {
                  p = this.pictureValue-1;
              target_mc.onRollOver = function() {
                  this._alpha = 50;
              target_mc.onRollOut = function() {
                  this._alpha = 100;
          image_mcl = new MovieClipLoader();
          image_mcl.loadClip(thumbnails[cat_actual][k], "thumbnail_mc.t"+k);


      k is the number of the image to create this thumbnail, and thumbnails[cat_actual][k] is the path that contains the thumbnail to show. I've tried to use the removeMovieClip(); function with thumbnail_mc but doesn't work. Any ideas? thans!!!