Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

preloader question

Status
Not open for further replies.

PaulFynch

IS-IT--Management
May 23, 2002
105
CA
hey guys, i need a preloader for my movie,
i have a main swf that loads external files, and i want the preloader in the external files (each built from the same template)

the main swf is only about 2k, the externals are anywhere from 35-150

i put it together like this...

frame one, external file
main timeline: stop();
i create an MC and give it 2 frames, on the 2nd frame:


loadedBytes=this.getBytesLoaded();
totalBytes=this.getBytesTotal();
if (loadedBytes<totalBytes){
percentage=int((loadedBytes/totalBytes)*100);
_root.loader.bar._xscale=percentage;
gotoAndPlay(1);
} else {
_parent.gotoAndStop(2);
}


i cant seem to get it to work, i replaced &quot;this.&quot; with &quot;_parent&quot; and &quot;_root.&quot; im quite sure checks the main movie values. how else can i go about this??

cheers!
paul
 
I find it easier to have a generic preloader within the main movie...

Check these 2 threads...



The second one is a generic preloader...

Regards,

cubalibre2.gif
 
hey oldnewbie...
can't open those files, are they flash mx, im still using 5....
i just mainly curious about how to check the bytesLoaded of a MC container, which it looks like you explain in your examples...but again, i cant open them :D

cheers
paul
 
Yeah! They're for Flash MX. Could publish them for 5, but script would have to be changed because it uses Flash MX only features.
Can't really spend some time on this right now... Maybe later tonight...

Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top