i made little modifications to your code to show how it works
this.createEmptyMovieClip("thumbnail", 1);
this.attachMovie("preloader", "preloader", 2);
thumbnail.loadMovie("/images/463526_klavier.jpg");
preloader.onEnterFrame = function() {
loading = thumbnail.getBytesLoaded();
total = thumbnail.getBytesTotal();
// "pre" is the clip in the progress bar to show the progress
// and "base" is the background of the preload, so it has the "width"
percent = loading/total*100;
this.pre._width = loading/total*this.base._width;
if (percent == 100) {
trace("end of preload")
// you wish delete this dunction
// or unload the preloader when finish
//delete this.onEnterFrame;
unloadMovie(preloader)
}
}
if (percent == 100) {
trace(“what´s happening??”)
unloadMovie(thumbs[“thumb”+i].preloader)
}
and i think you are trying tu unload a movie with code inside himself… i mean:
When you are inside “thumbs.preloader” if you say “unload(thumbs.preloader)”, the script is trying to find a clip named thumb inside him… so it don´t works.
Try put this “unload(_root.thumbs.preloader)” so you are calling it from the root of the movie, but if you are loading thinks one inside otheres or something like that, try put “_parent”