Would anybody know what to change in my script so that sketch.swf loads after the preloader is completed? Right now the movie appears while the preloader bar is still building. Thank you very much.
function preloadPic() {
clearInterval(id);
var con = picture.duplicateMovieClip(“con”+k, 9984+k);
con.loadMovie(image[k]);
var temp = _root.createEmptyMovieClip(“temp”+k, 99+k);
temp.onEnterFrame = function() {
var total = con.getBytesTotal();
var loaded = con.getBytesLoaded();
percent = Math.round((loaded/total*100)/image.length);
preloader.preload_bar._xscale = loadTot+percent;
info.text = "loading image “+k+” of “+image.length+” ";
if (loaded == total && total>4) {
con._visible = 0;
nextPic();
loadTot += percent;
delete this.onEnterFrame;
}
};
}
function nextPic() {
if (k<image.length-1) {
k++;
preloadPic();
} else {
firstImage();
a_mc.swapDepths(9999);
contents.swapDepths(9998);
picture.swapDepths(9997);
}
}
// ///////////////////////////////////
if (id.swf.loaded=true) {
contents.loadMovie(“sketch.swf”);
}