PDA

View Full Version : Movie Preloader not working.. again...


krone
08-18-2005, 08:33 AM
Hello my preloader is not working.. i changed something else and now it doesnt wanna work again

Basically i want to preload the main movie and a holder MC that loads up a seperate page. so when both have been loaded.. move to frame 2


stop();
//loads page into holder MC

_root.onLoad = function() {
loadMovie("pg01_home.swf", _root.holder);
};

onEnterFrame = function() {
totalBytesP = _root.holder.getBytesTotal();
loadedBytesP = _root.holder.getBytesLoaded();
percentP = Math.ceil((loadedBytesP/totalBytesP)*100);

totalBytesR = _root.getBytesTotal();
loadedBytesR = _root.getBytesLoaded();
percentR = Math.ceil((loadedBytesR/totalBytesR)*100);

_root.loaderBar.gotoAndStop(percentR);

if (percentR >=100 && percentP >=100) {

gotoAndStop(2);
delete onEnterFrame;
}
}



any help would be most appreciated.

cheerio