ciao a tutti,
ho un piccolo problema che spero mi aiutate a risolvere...ho fatto un po di ricerche ma non ho trovato nulla....
ricava la dati di oggi vorrei stampare con un ciclo i 5 giorni successivi
grazie a tutti per l'interesse....
ho questo codice :
//Array to hold a list of the weekdays.
var weekdays:Array = new Array ("Domenica","Lunedì","Martedì","Mercoledì",
"Giovedì","Sabato","Domenica");
//Array to hold a list of the months.
var months:Array = new Array ("Gennaio","Febbraio","Marzo","Aprile","Maggio","G iugno","Luglio",
"Agosto", "Settembre", "Ottobre","Novembre","Dicembre");
//Adds an event listener to the dymanic text field.
the_date.addEventListener(Event.ENTER_FRAME,showDa te);
function showDate(event:Event):void {
//Create a new instance of the date class.
var myDateate = new Date();
//Retrieve the day, month and year from the date class.
var theDay=weekdays[myDate.getDay()];
var theMonth=months[myDate.getMonth()];
var theDate=myDate.getDate();
var theYear=myDate.getFullYear();
//Display the date in the dynamic text field.
the_date.text=theDay+", "+theDate+" "+theMonth+" "+theYear;
}
//creo le variabili sommando i giorni
//pensavo funzionasse questo codice ma non va
var theDay_1 =weekdays[myDate2.getDay()];
var theDay_2 =weekdays[myDate2.getDay()+1];
var theDay_3 =weekdays[myDate2.getDay()+2];
var theDay_4 =weekdays[myDate2.getDay()+3];
var theDay_5 =weekdays[myDate2.getDay()+4];
//campi di testo dinamici dove stamapre i giorni
the_date_1.text=theDay_1 ;
the_date_2.text=theDay_2 ;
the_date_3.text=theDay_3 ;
the_date_4.text=theDay_4 ;
the_date_5.text=theDay_5 ;

ate = new Date();
Rispondi quotando
