ho una txtarea caricata con un file e in layer soprastanti degli MC vuoti caricati con immagini:
mentre per le immagini il preload (autoesplicativo):Codice PHP:System.UseCodepage = true;
dati1 = new LoadVars();
dati1.path = this;
dati1.onLoad = function(success)
{
if (success){
this.path.txt_area1.html = true;
this.path.txt_area1.htmlText = this.testo;
}else{
this.path.txt_area1.text="File non Trovato";
}
};
dati1.load("txt/basilisco_studio_progetto1.txt");
img1.loadMovie("img/basilisco_prog/1.jpg");
img2.loadMovie("img/basilisco_prog/2.jpg");
img3.loadMovie("img/basilisco_prog/3.jpg");
img4.loadMovie("img/basilisco_prog/4.jpg");
img5.loadMovie("img/basilisco_prog/5.jpg");
stop();
funziona, quello per la txt area:Codice PHP:onClipEvent(load){
this.percentuale = "0%";
}
onClipEvent(enterFrame){
car=_parent.img1.getBytesLoaded();
tot=_parent.img1.getBytesTotal();
perc = parseInt(car*100/tot);
if ((perc>=0)&&(perc<=100)){
this.barra._xscale = perc;
this.percentuale = perc + "%";
}
if(perc==100){
this._visible=0;
}
}
mi fa uno scherzetto:Codice PHP:onClipEvent(load){
this.percentuale = "0%";
}
onClipEvent(enterFrame){
car=_parent.dati1.getBytesLoaded();
tot=_parent.dati1.getBytesTotal();
perc = parseInt(car*100/tot);
if ((perc>=0)&&(perc<=100)){
this.barra._xscale = perc;
this.percentuale = perc + "%";
}
if(perc==100){
this._visible=0;
}
}
this.percentuale = perc + "%";
mi da NAN%!
ma ho messo la verifica
if ((perc>=0)&&(perc<=100))
apposta, per eliminare il caso undefined....
che devo mettere ?
if ((perc>=0)&&(perc<=100)&&(perc!=undefined))
è inutile....
basta un if (perc!=undefined) ?
che cosa combina-combino?

Rispondi quotando