sul frame scrivi questo ti restituisce numeri ramndom
al posto del trace in rosso metti il caricamento del tuo avi che deve chiamarsi per 1.avi ecc...
quindi metti il numero che peschi con in load tipo per es
+randomized[i]+".avi"
chiaramente il codice lo devi adatare alle tue esigenze spero ti possa essere utile il codice preso da sephirot.it
codice:
// ========================================
// Number.prototype.randomNumbers(n);
//
// Extracts (n) random
// non-repeating numbers from
// a given range and put them in an Array.
//
// Example: you need to extract 3 random,
// non repeating numbers in a range of 15,
// such as 3,9,14 but not 8,7,8...
//
// Usage:
// range = 15
// result = range.randomNumbers(3)
// trace(result[0])
// trace(result[1])
// trace(result[2])
//
// Matteo Balocco
// totanus@libero.it
//
// Credits: it uses parts of code from
// Array.prototype.shuffle() by info@adora.it
// ==========================================
Number.prototype.randomNumbers = function(n) {
myArray = new Array();
myNewArray = new Array();
for (var i = 0; i<this; i++) {
myArray[i] = i+1;
var control = true;
while (control) {
j = int(random(this));
if (myNewArray[j] == undefined) {
myNewArray[j] = myArray[i];
control = false;
}
}
}
myNewArray = myNewArray.slice(0, n);
return myNewArray;
};
ooo = 15
randomized = ooo.randomNumbers(5)
trace(randomized[1]);