tivaelydoc
Technical User
- Jul 4, 2007
- 6
Did I write this code wrong:
onClipEvent (enterFrame)
{
var time = new Date();
var month = time.getMonth()+1;
var day = time.getDate();
var hours = time.getHours();
var minutes = time.getMinutes();
var seconds = time.getSeconds();
var milliseconds = time.getMilliseconds();
this.hour._rotation = 30 * hours + minutes / 2;
this.min._rotation = 6 * minutes;
this.sec._rotation= 6 * seconds;
this.mil._rotation= .36 * milliseconds;
this.month._rotation= 30 * month;
this.day._rotation= 360/31 * date;
}
For some reason, all the hands work except the month and the day. How come?
onClipEvent (enterFrame)
{
var time = new Date();
var month = time.getMonth()+1;
var day = time.getDate();
var hours = time.getHours();
var minutes = time.getMinutes();
var seconds = time.getSeconds();
var milliseconds = time.getMilliseconds();
this.hour._rotation = 30 * hours + minutes / 2;
this.min._rotation = 6 * minutes;
this.sec._rotation= 6 * seconds;
this.mil._rotation= .36 * milliseconds;
this.month._rotation= 30 * month;
this.day._rotation= 360/31 * date;
}
For some reason, all the hands work except the month and the day. How come?