Ciao a tutti,
ho un problemino nell'assegnare dinamicamente l'istanza a createtextfield e createemptymovieclip. Uso il seguente codice:
dati = new LoadVars();
dati.path = this;
dati.onLoad = function(success) {
if (success) {
createTextField([marca+"1"], getNextHighestDepth(), 0, 0, 150, 22);
createTextField("marca2", getNextHighestDepth(), 0, 30, 150, 22);
createTextField("tipo1", getNextHighestDepth(), 180, 0, 150, 22);
createTextField("tipo2", getNextHighestDepth(), 180, 30, 150, 22);
createEmptyMovieClip("immagine1",getNextHighestDep th());
createEmptyMovieClip("immagine2",getNextHighestDep th());
immagine1._x=340;immagine1._y=0;
immagine2._x=340;immagine2._y=100;
max = this.totalCar;
for (i=1; i<=max; i++) {
this.path["marca"+i].text = this["marca"+i];
this.path["tipo"+i].text = this["tipo"+i];
this.path["immagine"+i].loadMovie(["imguploads/"+this["immagine"+i]],this["immagine"+i]);
}
}
};
dati.load("dati.txt");
come posso inserire anche createtextfield e createemptymovieclib all'interno del ciclo for?
Grazie dei suggerimenti, by