I have a problem on how to preload external text in my preloader.
I have the following code on frame 1, this preloads the entire swf, but not the textfile which is loaded on another frame:
path = “IMA_Services/”;
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loaderbartext = Math.round(getPercent100)+"%";
if (bytes_loaded <= bytes_total/2) {
this.loaderbar._width = 750getPercent2;
this.loaderbar._x = 5;
} else if (bytes_loaded > bytes_total/2) {
this.loaderbar._width = 1500-(1500(getPercent));
this.loaderbar._x = 5+(1500*(getPercent))-750;
};
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
On Frame 2 I have the usual :
gotoAndPlay(1);
On frame 8 I have the textloaders and on that frame the texfields appear in the movie with a fade over a couple of frames, trouble is if text is to long I do not see the text fading but _level0.projectcontainer.textfield1:
loadText1 = new loadVars();
loadText2 = new loadVars();
loadText1.load(path+“Services_Arc_1_0.txt”);
loadText2.load(path+“Services_Arc_1_1.txt”);
loadText1.onLoad = function(success) {
if (success) {
textfield0.html = false;
textfield0.Text = this.textfield0;
}
}
loadText2.onLoad = function(success) {
if (success) {
textfield1.html = true;
textfield1.htmlText = this.textfield1;
}
}
var ipos = 1;
Can someone help me integrating the textload in the preloader ?
Any help is welcome, I am trying mysself but have had no success yet.
Christophe