Connecting Tech Pros Worldwide Help | Site Map

Help with unload images from movieclip

Member
 
Join Date: Aug 2008
Posts: 41
#1: Jul 10 '09
Hi guys ,

I have a problem trying to unload some images from a movie clip , not sure what i'm doing wrong , if anyone can help me please..

What i have is a movie clip called " thumbnails" on the stage which loads some images from an array . the movieclip "thumbnails" , holds at the begining the first 4 images , then i have a button called "next_btn" which loads the next 4 images .basically when the next_btn is click it is loading the next 4 images which place them on top of the first ones , and is fine , but what i need to do is to clear the movie clip before loads the next images into.
i have tried the unloadMovie method and it is not working , place the code below if anyone has any ideeas what i'm doing wrong ( actionscrip2 )

Expand|Select|Wrap|Line Numbers
  1. next_btn.onRelease=function(){
  2.      //unloadMovie ("thumbnails");
  3.      //thumbnails.unloadMovie();
  4.      trace("DFDFDS");
  5.      _global.position=0;
  6.     for (j=check_last+1; j<check_last+4; j++) 
  7.  
  8.                     {        
  9.                         trace(" i got here");
  10.                         this.thumbHolder = _root.thumbnails.createEmptyMovieClip("thumbnail"+position, position);
  11.                         this.thumbHolder._x = position*spacing;
  12.                         this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
  13.  
  14.                         this.thumbLoader.loadMovie(images[j][3]);
  15.                         this.thumbHolder.title =images[j][0];
  16.                         this.thumbHolder.main = images[j][2];
  17.                         position++;
  18.                         this.thumbHolder.onRelease = function() 
  19.                             {
  20.                             loader.loadMovie(this.main);
  21.                             title_txt.text = " Price = " + this.title;
  22.  
  23.                             }
  24.                     }
  25.                     check_last=j;
  26.                     trace (j);
  27. }
  28.  
Thanks.
Member
 
Join Date: Aug 2008
Posts: 41
#2: Jul 16 '09

re: Help with unload images from movieclip


guys ..this is getting me crazy ..

i have added a new button on the stage and i've placed the " unloadMovie ( thumbnails)"
there .
When the button is clicked its emptying the movie clip and is ok , then i click next and is loading the next images ,
BUT if i place the code so that when i press next to empty the images ..is just emptying the movieclip and is not dispalying the next images WHYYYY...ANYONE ...PLSSS
Reply