In the bottom layer of my movie, I have a MC called pictureback. It is the background for my movie. Id like the picture to change when I click a button. Right now, Ive got this, and its working, but Id like it to show a preloader, and then not just replace the image, but slide in from the right. (All with actionscript).
On my button, I have
MenuNav.b0.onRelease = function() {
load_pic("backpics/pic1.swf");
};
and a function which loads the pic into the holder
function load_pic(whichmovie){
var currentPic = whichmovie;
var total = _root.pictureback.holder.getBytesTotal();
var loaded = _root.pictureback.holder.getBytesLoaded();
var percent = int(loaded/total*100);
_root.picloader.text = percent+"%";
if (loaded == total) {
_root.pictureback.holder.loadMovie(currentPic, 1);
_root.picloader._visible = false;
}
}
The pic loads, but the text counter isnt working.
I would like it to show a number or percent loaded, and when its done loading, slide in over the current picture. Ive seen this done before by swapping the depths, and replacing the current pic with the new pic. I just dont know how to do it, and was hoping someone could help.
Thanks,
Rich