Randomized frames help - have the basics

I found this nice code/file over at Senecular, but I need some help modifying it.

I really dig the functionality (transitions between mcs/the timer/easy to add more frames to the main mc), but would like it to randomize the playback.

(Instead of just playing the frames of the main MC in order, I’d like it to play and transition between all of the frames in a random order.) Ideally, it’d be nice to not play the same frame twice, but I’ll live if it doesn’t.

(Beggars can’t be choosers, right?)

On the first frame there is the main MC, and inside of that the different frames live.

If I weren’t such an actionscript loser, I might have a chance.

Here’s the code on the 1st frame:

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

FadeSequence = function(args){
with (args){
timer++;
if (timer > pauseTime){
if (timer < pauseTime + fadeTime){
var curr_fade = timer - pauseTime;
mc1._alpha = 100curr_fade/fadeTime;
mc2._alpha = 100
(fadeTime - curr_fade)/fadeTime;
}else FadeSequenceReset(args);
}
}
}
FadeSequenceReset = function(args){
with (args) {
timer = 0;
mc1._alpha = 0;
mc2._alpha = 100;
mc2.gotoAndStop(mc1._currentframe);
mc1.gotoAndStop(1 + (mc1._currentframe%mc1._totalframes));
}
}
FadeSequenceInit = function(sequence, pauseTime, fadeTime){
var args = new Object();
args.timer = 0;
args.pauseTime = pauseTime;
args.fadeTime = fadeTime;
args.mc1 = sequence;
args.mc2 = args.mc1.duplicateMovieClip(args.mc1._name + “2”, 1 + args.mc1.getDepth());
args.mc1.stop();
args.mc2 .gotoAndStop(2);
FadeSequenceReset(args);
return args;
}
// --------------------------

// FadeSequenceInit([movieclip with images], [frames to show an image], [frames to fade images]);
var fadeArgs = FadeSequenceInit(sequence_mc, 50, 25);
this.onEnterFrame = function(){
if (pause_mc._currentframe == 1) FadeSequence(fadeArgs);
}

>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Any ideas on how to modify this code?

Attached is the file.

Thank you.