Originariamente inviato da rempox
certamente si
tipo txt
&path=/images&
&F0=mare.jpg&
&F1=montagna.jpg&
&F3=pianura.jpg&
Codice PHP:
mio_array = new Array()
dati = new LoadVars()
dati.onLoad=function(success){
if(success){
I = 0
while(this["F"+I] != undefined){
mio_array[I] = this.path+this["F"+I]
I++
}
}else{trace("errore caricamento TXT")}
}
dati.load("tuoFile.txt")
Io ho fatto una cosa del genere:
Codice PHP:
var img = new Array();
dati = new LoadVars()
dati.onLoad=function(success){
if(success){
I = 0
while(this["F"+I] != undefined){
img[I] = this.path+this["F"+I]
I++
}
}
else{trace("errore caricamento TXT")}
}
dati.load("variabili.txt")
trace(img[0])
ma nel trace, esce undefined... dove sbaglio????
(Ovviamente ho messo il txt con il formato che mi hai detto te...
&path=/images&
&F0=mare.jpg&
&F1=montagna.jpg&
&F3=pianura.jpg&
)