That coding is for flash yes....try making a new flash movie and place that code on the time line.
Currently it traces out the time of day...i.e. in the flash tester it opens the output window and prints the relevant bit. This will be of no use to you in aproper swf, you will need to make a textfield give it an instance name and then use something like:
Code:
now = new Date;
var hour = now.getHours();
if (hour<12){
timeOfDay="Good Morning";
}else if((hour>=12)&&(hour<19)){
timeOfDay="Hi Kids!";
}else{
timeOfDay="Shouldn't you be in bed?";
}
//myText is the instance name of the textField
myText.text=timeOfDay;
Good Luck!
Taff
Bookmarks