Analog Clock In Flex
Hi Folks,
Here comes the analog clock in Flex,in this i have a component called wall clock in which we have a circle,minutes hand,hours hand and seconds hand.
Each Hands of the clock is a line drawn from the center of the circle to the circumference at an angle.The following post http://www.flashandmath.com/ helped me in drawing a line with specified angle.
The seconds hand line will be drawn and cleared every second,since the full angle in a circle is 360 and the no of seconds per minute is 60 for each second, the seconds hand line will be drawn with an incremented angle of 6 degrees.
The seconds hand keeps on ticking and when 60 ticks have been completed the tickcounter angle will be 180 so at that time i have increased the angle of minute hand to another 6 degrees.This Continues so that minute hand is moved at the rate of 6 degrees per minute.
The Hours hand is moved at the rate of 6 degree per 12 minutes.
feedback