Hi there, i hadn't seen any good examples of a countdown timer in Flash using the server-side date values so I started looking into it myself but i have run into a bit of a problem.
I'm using actionscript 3 and PHP as my server-side language. I've managed to get the time into flash by creating a PHP document which grabs the time. I generated the HTML using PHPs echo function and the date information is then passed to Flash using External interface but i'm not sure how to actually count down this timer once it's loaded. In the countless examples i've seen, most just keep using the .getTime() function to keep updating the time, but I can't use it because the time is only loaded once on button press within the PHP document i created.
In the Flash document i created, there are a number of textfields. The ones along the top with the 'day', 'month', 'year', 'hour', 'min', and 'sec' labels are the values as they are passed to Flash using External Interface. The next one down is the amount of time until christmas of 2010. The 'now' textfield is the server-side day as it was passed but formatted a bit differently. Lastly, the 'Xmas' textfield is the date for christmas of 2010.
Anyways, i'll attach the code below, but basically what i need is for this thing to count down visually by the second using this server-side date information which is passed to Flash. Any help would be much appreciated!
Here is a link to an archive with the 'index.php' and 'countdown.swf' files :