In order to remove previously loaded slides we have to remove the slideholders created with ´duplicateMovieClip()´. So we create a frame after all the slide show frames with the following script, which also clears Interval and unloads slides.
function removeClips () {
for (j=1;j<=10;j++) {
_root["pic_"+j].removeMovieClip();
}
}
removeClips();
_root.clearEverything();
_root.slideHolder.unloadMovie();
//go back to the actionscript frames and automatically to the main menu
gotoAndPlay(1);