Hi Friends,
I have a class called seven segment display which contains seven segments to display a digit.The Digital clock has six seven segment display to display the time.In Digital clock class we have a timer which fetches system time and separates the hours,minutes and seconds and displays it in the respective seven segment display ,this is repeated for every 992 milli seconds ,which simulates a digital Clock.

View Demo
Download Source
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.

Download Source :
View Demo
feedback