Bonjour à tous!
Le code (viellot) de mon preloader fonctionne mais pas à 100%.
Quand je visionne la page sur IE7, il reste à zéro jusque quand l'image se charge.
Sur Firefox 3.0.8, j'obtiens un NaN jusqu'au chargement de la photo.
Si quelqu'un possède la solution, je suis preneur.
Je bosse en CS3
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
bar._visible = 0;
per = Math.round((l/t)*100);
if (t == l && containerMC._width>0 && containerMC._height>0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h);
bar._visible = 1;
picinfo.info.text = tArray[pic];
piesdefotos.parrafo01.text = iArray[pic];
containerMC._alpha = 0;
delete this.onEnterFrame;
} else {
bar._width = per;
picinfo.info.text = per+" % cargando texto e imagen, esperen por favor...";
bar._visible = false;
}
};
};
Merci à tous