I wrote a class CountDown for Actionscript 3.0. To test it I created an example using the text-rendering capabilities FIVe3D .
Download the source
) in 3D scritto FIVe3D. The source countdown.zip includes the class CountDown that the example ( CountDownDemo ) 3D FIVe3D wrote. In this example you can also change the ending date through a text field editable. The class CountDown will be inserted as soon as possible Undolibrary .
CountDown Class
The class can be instantiated by entering the year, month, day, hour, minutes and seconds of the end date:
1 2 3 4 5 6 7 | CountDown = new CountDown ( 2009 , 1 , 1 ) ; // primo gennaio 2009 cd var: = new CountDown CountDown (2009, 1, 1) / / January 1, 2009 Event . ENTER_FRAME , addEventListener ( Event . ENTER_FRAME, e : Event ) : void { function (e: Event ): void { ; cd. Refresh (); cd . leftDays + '-' + cd . leftHours + '-' + cd . leftMinutes + '-' + cd . leftSeconds + '-' + cd . leftMilliseconds ) ; trace (cd. leftDays + '-' + cd. leftHours + '-' + cd. leftMinutes + '-' + cd. leftSeconds + '-' + cd. leftMilliseconds); } ); |
You can change the end date without re-instantiate the class CountDown . For this there are two distinct methods: setCountDown() and setCountDownByText()
1 2 3 4 | CountDown = new CountDown ( ) ; cd var: = new CountDown CountDown (); 2009 , 1 , 1 ) ; cd. setCountDown (2009, 1, 1); / / '2009,1,1' ) ; cd. setCountDownByText ('2009, 1.1 '); |











Very interesting ...
I noticed that other FIVe3D released demo ... very, very curious =)
great development!
Well I would say ... fabulous.
compliments
@ Krayen: Thanks!
[...] Post by 3D CountDown FIVe3D (see also How I Did It: write a countdown in Flash), was proposed for a class [...]