I’m loading in random SWF files into a header file with the following code:
loadMovie("headers/coldfx.swf","swf_mc");
var movieArray:Array = ["headers/coast.swf", "headers/coldfx.swf", "headers/enervest.swf", "headers/fairplay.swf", "headers/interpipe.swf", "headers/mantra.swf", "headers/westin.swf"];
function loadSwf() {
swf_mc.loadMovie(movieArray[Math.floor(Math.random()*(movieArray.length-0))]);
}
function startMyInterval() {
myInterval = setInterval(loadSwf, 30000);
}
startMyInterval();
I would love to be able to ensure that the same SWF is not loaded twice in a row.
Also I would like to be able to trace the loaded SWF. Is it possible to load the name of the currently loaded SWF into a variable or something?
Thanks!