Salve!
Vorrei inserire in un codice una variabile tipo questa:
var index:Number = 1;
che si auto incrementa con index++
Quello che mi servirebbe è però creare una sequenza 001, 002, 003, 004,..010,..100,..999 e non 1, 2, 3, 4,..
come posso fare?![]()
Salve!
Vorrei inserire in un codice una variabile tipo questa:
var index:Number = 1;
che si auto incrementa con index++
Quello che mi servirebbe è però creare una sequenza 001, 002, 003, 004,..010,..100,..999 e non 1, 2, 3, 4,..
come posso fare?![]()
beh allora devi trattare i numeri come testo
var index:Number = 1;
var index_testo:string;
index++;
index_testo="00"+index;
...Ignorance is bliss...
no perchè verrebbe 00999
codice:for(I=1;I<1000;I++){ if(I<10){Index = "00"+I} if(I>9 && I<100){Index = "0"+I} if(I>99){ Index = I} trace(Index) }
Flash MX Esempi da scaricare -
Team www.BeatFly.com - render,photo,ecc.. Elements01.net - Beat Fly official Blog-
Grazie mille!![]()
rempox
Flash MX Esempi da scaricare -
Team www.BeatFly.com - render,photo,ecc.. Elements01.net - Beat Fly official Blog-