# Preload multiple external .txt files?

**URL:** <https://forum.kirupa.com/t/preload-multiple-external-txt-files/192671>\
**Category:** flash\
**Created:** [June 30, 2006, 4:37am UTC](https://forum.kirupa.com/t/preload-multiple-external-txt-files/192671 "2006-06-30T04:37:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jennings112](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@jennings112](https://forum.kirupa.com/u/jennings112)\
**Post date:** [June 30, 2006, 4:37am UTC](https://forum.kirupa.com/t/preload-multiple-external-txt-files/192671/1 "2006-06-30T04:37:40Z")

</div>

hey,

Does any one no how to preload multiple txt files?

Here is my preloader script if it helps

> 

onClipEvent (load) {  
// start the width of the load bar to be 0  
this.\_xscale = 0;  
//check to see if page is already loaded, if so go to “start”  
if (\_parent.getBytesLoaded() == \_parent.getBytesTotal()) {  
\_parent.gotoAndPlay(“Start”);  
}  
}  
onClipEvent(enterFrame) {  
// Find how many bytes of this movieClip have loaded  
// using \_parent assumes this code is on a movieClip  
// at the \_root of the swf being loaded  
loadedBytes = \_parent.getBytesLoaded();  
// Get the total bytes of the movieClip  
totalBytes = \_parent.getBytesTotal();  
// determine the percentage of bytes that have loaded  
percentDone = Math.round((loadedBytes / totalBytes) \* 100);  
// display the percentage of loaded bytes in the text field loadStatus  
\_parent.loadStatus = percentDone + “%”;  
// set the size of our loadBar clip to the percent of loaded bytes  
this.\_xscale = percentDone;  
// move the loader movieClip to the appropriate frame  
\_parent.loader\_mc.gotoAndStop(percentDone);  
// if all the bytes have finished loading…  
if(loadedBytes == totalBytes) {  
// …play the rest of the movie  
new mx.transitions.Tween(this, “\_alpha”, mx.transitions.easing.Regular.easeIn, 100, 0, 35);  
\_parent.gotoAndPlay(“Start”);  
}  
}
