How can i do to change the lost-in-beta preloader to show
3 different messages. The first “loading interface”
during the first 33% and then “loading content”
during the next 33% And finnally “loading menu”
during the last 33% of the preloading sequence?
The messages will be shown under the percent textfield!
Dynamic Way !
system
July 3, 2003, 12:35am
2
Make another text field with the variable ‘loadText2’ and use this instead:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if(getPercent <= 33) {
this.loadText2 = "Loading Interface";
}
if(getPercent >= 33 && getPercent <= 65) {
this.loadText2 = "Loading Content";
}
if(getPercent >= 66 && getPercent <= 99) {
this.loadText2 = "Loading Menu";
}
if(getPercent >= 100) {
this.loadText2 = "Loaded";
}
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
system
July 3, 2003, 12:22pm
3
I used your code in frame 1. And in frame 2 I used
this.gotoAndPlay(1);
And in frame 3 the content is.
But the “loading interface” is there all the time !
system
July 3, 2003, 12:46pm
4
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if(getPercent <= 33) {
this.loadText2 = "Loading Interface";
}
if(getPercent > 33 && getPercent <= 65) {
this.loadText2 = "Loading Content";
}
if(getPercent >= 66 && getPercent <= 99) {
this.loadText2 = "Loading Menu";
}
if(getPercent >= 100) {
this.loadText2 = "Loaded";
}
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
There was an = too much at the second “if” … (I think)
system
July 3, 2003, 12:50pm
5
Still the same problem !!
system
July 3, 2003, 12:53pm
6
Just thought of this … It might be possible that getPercent still has to be multiplied with 100.
[AS]
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent100;
this.loadText = Math.round(getPercent 100)+"%";
if(getPercent100 <= 33) {
this.loadText2 = “Loading Interface”;
}
if(getPercent 100 > 33 && getPercent100 <= 65) {
this.loadText2 = “Loading Content”;
}
if(getPercent 100 >= 66 && getPercent <= 99) {
this.loadText2 = “Loading Menu”;
}
if(getPercent*100 >= 100) {
this.loadText2 = “Loaded”;
}
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
[/AS]
system
July 3, 2003, 12:55pm
7
Yes ! Worked Fine. Thanks very much for your help !
Is it also possible to have the loadbar and the percent starting over from zero for every message. So when the message changes the loadbar and percent starts from 0 again ?