Hey again,
I’m still working on this little side show that uses an array to loop though the pics. I’m now realizing that there’s going to be a whoooole lot of pictures in this array and instead of list them all individually I’m hoping there’s some way to define the array as every image in a directory. I could possibly have it loop by telling flash to start over once it looped through the total amount. Anyway here’s my code (minus the long array) if it helps.:-/
stop;
stage.showMenu = 0;
stage.scaleMode = "noScale";
this.pathToPics = "pics/";
pics = new Array("01.jpg", "02.jpg", "03.jpg");
var count = 0;
_root.createEmptyMovieClip("container_mc", 2);
preloadMovie(this.pathToPics+pics[count]);
//functions////////////////
function preloadMovie(clip) {
container_mc.loadMovie(clip);
var temp = this.createEmptyMovieClip("temp", 9999);
temp.onEnterFrame = function() {
//preloader_mc._visible = true;
var loaded = container_mc.getBytesLoaded();
var total = container_mc.getBytesTotal();
//var getPercent = Math.round((loaded/total)*100);
//preloader_mc.loadBar_mc._xscale = getPercent;
//load_txt.text = "Processing "+getPercent+" %";
if (loaded == total && total>10) {
//loadBar_mc._xscale = 0;
//preloader_mc._visible = false;
//load_txt.text = "";
container_mc.onPress = function() {
nextPic();
sound_mc.play();
};
delete this.onEnterFrame;
}
};
}
function nextPic() {
count++;
if (count>20) {
count = 0;
}
preloadMovie(this.pathToPics+pics[count]);
trace(count);
}