onClipEvent (load) {
backup = ["minnie", "pluto", "pippo", "gamba"]; // linkage dei movieclip nella libreria
movie = new Array();
replace = function(){
for(i = 0; i < backup.length; i++)movie[i] = backup[i];
};
sceltaRandom = function(){
if(movie.length == 0) replace();
num = random(movie.length)
temp = movie[num];
movie.splice(num, 1);
this.attachMovie(temp, "clip", 1); // attacchi il movieclip dalla libreria
}
replace();
sceltaRandom();
}
onClipEvent(enterFrame){
frame = this.clip._totalframes;
if(frame > 1 && this.clip._currentframe == frame){
this.clip.removeMovieClip();
sceltaRandom();
}
}