Ça fontionne un peu mieux, en tout cas au niveau du pourcentage affiché, et au moins ça ne "plante" pas!
Ce genre de barre fontionne bien dans l'application elle-même, mais c'est une autre chose online! C'est souvent erratique.
J'ai modifé le preloader de la façon suivante:
Frame 1:
if (_root.getBytesLoaded()>=_root.getBytesTotal()) {
_root.gotoAndPlay(4);
}
loaded = Math.round(getBytesLoaded()/1024);
total = Math.round(getBytesTotal()/1024);
// left FrameLoad... but usually is percent...
FrameLoad = Math.round((loaded/total)*100);
bardisplay = (FrameLoad/10)+2;
barra.gotoAndStop(bardisplay);
Frame 2:
barra.gotoAndStop(bardisplay);
Frame 3:
if (loaded>=total) {
gotoAndPlay (4);
} else {
gotoAndPlay (1);
}
Pourrait aussi être:
Frame 3:
if (_root.getBytesLoaded()>=_root.getBytesTotal()) {
_root.gotoAndPlay(4);
} else {
gotoAndPlay (1);
}
Si tu as d'autres questions... Tu as mon adresse de Montréal, n'hésites pas!
Regards,
ldnewbie