Ciao a tutti sto cercando di creare dei campi di testo dinamici all'interno di un clip ...Nessun Errore ...Nessun Risultato
onClipEvent (load) {
//Creo un database
_root.mySelect = new Array(4)
_root.mySelect[1]="n°1 info Oahu"
_root.mySelect[2]="n°1 info Bahu"
_root.mySelect[3]="n°1 info Cahu"
_root.mySelect[4]="n°1 info Dahu"
// Creo un clip vuoto e lo posiziono
_root.createEmptyMovieClip ("carrello", 0)
_root.carrello._y=15
_root.carrello._x=15
// calcolo gli elemnti + 1 dell'Array
_root.elementi= _root.mySelect.length
// Ciclo di scorrimento Array
for (i=1; i<_root.elementi; i++){
// Creo dentro carrello il testo dinamico, Depth=i, _x=15 _w=110 _h=18
_root.carrello.createTextField("mytext"+i,i,15,(i* 18-18),110,18)
_root[nametxt].text = _root.mySelect[i]
_root[nametxt].type = "dynamic"
_root[nametxt].variable = "mytext"+i
_root[nametxt].multiline = false;
_root[nametxt].wordWrap = false;
_root[nametxt].border = true;
// Formato Testo
_root.myformat = new TextFormat();
_root.myformat.color = 0xcc3300;
_root.myformat.font = "ARIAL"
_root.myformat.size = 10
_root.myformat.bullet = true;
_root.myformat.underline = true;
_root[nametxt].setTextFormat(myformat);
}
}
Perche non viene fuori NULLA![]()
![]()
![]()
Grazie