
Код:
myDate = new Date(hours);
hours = myDate.getHours();
_root.onEnterFrame = function() {
// --------Date--------------------------------------------
_root.createTextField("text_date", 2000, 70, -2, 300, 100);
text_date.multiline = 1;
text_date.wordWrap = 1;
text_date.border = 0;
text_date.selectable = 0;
if (hours>=0 && hours<4) {
text_date.text = "noch";
//_root.gotoAndStop(scene,frame);
} else if (hours>=5 && hours<12) {
text_date.text = "ytro";
//_root.gotoAndStop(scene,frame);
} else if (hours>=12 && hours<17) {
text_date.text = "den'";
//_root.gotoAndStop(scene,frame);
} else if (hours>=17 && hours<23) {
text_date.text = "vecher";
//_root.gotoAndStop(scene,frame);
}
// __format_______________________________
myformat = new TextFormat();
myformat.font = "BitDust One";
myformat.bold = 1;
myformat.size = 14;
myformat.italic=0, myformat.color=0x660099;
myformat.bullet = 0;
myformat.underline = 0;
text_date.setTextFormat(myformat);
// --------end_date----------------------------------------
};