Setting time-dependent greetings

Hi everyone,

I’ve got a movieclip with a dynamic text box called “time” on my stage, which gets the time, day, date and year. That part works perfect. The code for the movieclip if you’re interested is…

onClipEvent (load){

// Arrays for Month and Week Days.

mon = [“Jan”,“Feb”,“Mar”,“Apr”,“May”,“Jun”,“Jul”,“Aug”,“Oct”,“Nov”,“Dec”];
weekdays = [“Sunday”,“Monday”,“Tuesday”,“Wednesday”,“Thursday”,“Friday”,“Saturday”];
}
onClipEvent (enterFrame){

// Working out Day, Date and Year display.

now = new Date()
nDay = weekdays[now.getDay()]
nMonth = mon[now.getMonth()]
nDate = now.getDate()
nYear = now.getFullYear()

// Time display. Displays hours, minutes and seconds in 24 hours time format.

myTime = new Date();
nSeconds = myTime.getSeconds();
nMinutes = myTime.getMinutes();
nHours = myTime.getHours();

// Sets 24 hour format on the hours display.

if (hours>=13) {
	nHours = nHours-12;
}

//if the minutes are a single digit, for example 7 minutes past the hour then add a 0 infront of the minute making it 07 minutes. 

if (length(nMinutes) == 1) {
	nMinutes = "0"+nMinutes;
}

//if the seconds are a single digit, for example 7 seconds then add a 0 infron it the second making it 07 seconds.

if (length(nSeconds) == 1) {
	nSeconds = "0"+nSeconds;
}

//nTime is the dynamic text instance name.

nTime = nHours+":"+nMinutes+":"+nSeconds+"   l   "+nDay+"   l   "+nMonth+" "+nDate+", "+nYear;

}

ANYWAY…on with the show.

I’d like to have a movieclip, for example “greeting” that says GOOD MORNING, GOOD AFTERNOON or GOOD EVENING dependent upon the current time.

Can anyone give me any pointers??!!

Thanks.