Topic: PreLoader perfect for main movie but not so good for external movies??

I have a simple preloader that works perfect for loading my main movie but I have also attached it onto my external movies and the bar loads but the percentage now stays at 100 instead of incrementing? Is there a reason for why an external preloader would change the rules? My preloader script is as follows:

on frame 3

this._lockroot = true;
loadedbytes = _root.getBytesLoaded();
totalbytes = _root.getBytesTotal();
frame = int(loadedbytes/(totalbytes/100));
if (frame > 100) {
frame = 100;
}

if (loadedbytes == totalbytes) {

// this takes you to the next scene
_root.gotoAndPlay(5);
}

on frame 4

// not done loading ... go back and do it again
gotoAndPlay(2);

on loading bar

onClipEvent(enterframe) {
this.gotoAndStop(_root.frame);
}

where the number increments the 'Var' in the properties is set to '_root.frame'

Hope this helps and hope someone clever out there can help me as the number increasing is very important to my preloader design.

thx

Eddie

Last edited by Eddie_E (2008-04-26 23:13:32)

Re: PreLoader perfect for main movie but not so good for external movies??

If you use _root in an external movie and it's loaded into the main movie/swf file, the _root property references the main movie and not the external movie that it was placed in

Daniel Marino | www.iamdanielmarino.com

Re: PreLoader perfect for main movie but not so good for external movies??

Thx

cant believe something so simple eluded me for weeks

regards

Eddie