source file is too big, but...
retrotron,
my source fla is too big to post, but here's my actionscript from frame 1 of the _root movie:
Code:
stop();
// flag is a file loading.
fileLoading = false;
function loadAudioFile(theURL) {
loadMovie(theURL, "mcholder1");
loadMovieNum("../flash/preloader.swf", 1);
loading = 0;
total = 0;
percent = 0;
per = 0;
if (!fileLoading) {
fileLoading = true;
loaderInterval = setInterval(loadChecker, 50);
}
}
function loadChecker() {
loading = mcholder1.getBytesLoaded();
total = mcholder1.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
_level1.loadBar._width = per * 2;
if (percent > 99) {
unloadMovieNum (1);
mcholder1.gotoAndStop("loaded");
fileLoading = false;
clearInterval(loaderInterval);
}
}
for (i=1; i <= 6; i++) {
_root["btn"+i].index = i;
_root["btn"+i].onRelease = function() {
loadAudioFile("../flash/clip" + this.index + ".swf");
};
}
Is there anything else I could explain to you that would help?
-Foochuck