Search  

COUNTDOWN TIMER TO REGION-BASED EVENTS(XML DRIVEN USING GMT)

HomeBrowse CategoriesFlashApplications and UtilitiesUtilitiesCountdown Timer to Region-Based Events(XML Driven using GMT)

See here for a version with current XML data so you can see it running properly.

Unlike most countdown scripts that count down to a specific LOCAL event (such as New Years Eve), this script counts down to REGION -BASED events by taking into account the viewers timezone, clock setting and by using a GMT (Greenwich Mean Time) offset for each XML entry.

For example:

Usually a script will count down to an event such as NYE so no matter where a visitor is located in the world, the countdown will simply count from the visitors CURRENT PC time to NYE (using the same timezone)

However, what if we want to count down to an event that may be located in a DIFFERENT timezone to where the visitor is located? An example would be counting down to the opening of the US Grand Slam Tennis event. If the countdown simply used the visitors PC clock then unless the visitor was in the SAME timezone, the countdown would not accurately reflect a specific point in time when the event has actually started. This utility takes all that into account (dependent of course on correct time and timezone being set on a visitors computer)

  • Therefore, this utility takes timezones into account and GMT (Greenwich Mean Time) offsets via a GMT setting within the XML .
  • The XML allows for an event range rather than just an event date and time. ie. an event such as the US Open which runs for a couple of weeks can be counted down to the START DATE and TIME , show an “EVENT IN PROGRESS ” message for the duration, and once over AUTOMATICALLY BEGIN counting down to the NEXT event in the XML .
  • If the timer is left running for an extended time it will automatically move on to counting down to the next event when the current active event expires. (Many countdown timers will stay locked on to the “EVENT IN PROGRESS ” message even once the event END DATE and TIME has passed and will neglect to start counting down to the next event.
  • This utility uses xfactorstudio XML parsing library and shows some (hard to find) examples of utilising the library
  • The framerate of this FLA for BEST accuracy should be set to 1. However changing the framerate to something else will still work perfectly fine. Using a frame based count rather than a setInterval gives best results.
  • Is built so that a path to the xml file can be passed in via FlashVars in th HTML source or appended via querystring.
  • Further XML attributes could easily be added and then read in via the displayEventInfo() function

How to modify the file:

  • There are comments throughout the FLA that explain how the code works and also within the XML
  • To test the effect of timezones you can change your PC’s time and/or timezone and effectively see how someone else in a different timezone would see the count down.
  • Below is an example event XML entry (please refer to event_data.xml for complete, multiple event example) :

<event startDate="15/1/2007" startTime="10:00" endDate="28/1/2007" 
endTime="20:00" GMT="11" title="AUSTRALIAN OPEN" image="aus_open" 
linkGeneric="http://www.australianopen.com" 
linkOn="http://www.australianopen.com/en_AU/scores/index.html"/>
  • dates are in DD/MM/YY format and times use 24 hour time
  • GMT :(Greenwich Mean Time) is used to offset these local times to the users local time.

- Info on timezones can be found here : http://www.worldtimezone.com

- Info on Daylight Savings Dates can be found here : http://www.worldtimezone.com/daylight.html

- Daylight savings needs to be taken into account via changing the GMT offset values – when an event is taking place during Daylight Savings (in that events region), add 1 hour to the GMT attribute – for example Melbourne, Australia (where the Aus Open is held) is in timezone GMT +10, but it’s held during Summer with Daylight Savings applied, so add 10+1=11 which is entered below

  • title : is displayed as either event we’re counting down to or the event that’s currently active
  • image : this actually maps to a frame label wihin the “images” movieclip.
  • linkGeneric : can be used to link to a generic event page
  • linkOn : can be used to link to the current event’s results page (for example) when an event is active

You MUST put events in the XML in chronological order or else you will get unpredictable results

Posted about 1 year ago

Good job. I had a heck of a time doing something like this a few years ago. I may need to use this next time.

Posted about 1 year ago

This is dope ! exactly what I was looking for. Great job ;)

Posted about 1 year ago

hi, I was curious to know about the flash timer. the project I’m working on consists on loading a group of swf files loaded through xml. I want to use a timer that will load a different swf each day.

so for example: file #1 will load on nov22 file #2 will load the next day etc etc… can that be possible with this flash timer, I’m sure some customization will be involved on my part…. but can it be done?

Also, is the timer based on server time or the user’s computer? can it be set to the server in case users don’t have the correct time on their computers? or is their location determined by their IP address?

thanks.

Posted about 1 year ago

thanks for the fla.. I bought it but when I publish the fla. I cant see the timer. I didnt make any changes..

I opened it with CS3

thanks Ferdi

Posted 8 months ago

Deos it with in CS3 I mean can I save as flash 8.0?

Posted 4 months ago

Can you change the xml’s date so I can see the preview? It looks nice in the thumbnail.

Posted about 1 month ago

Would you please remove the large background and leave only the box with countdown effect? I’m not to savvy editing flash. I just purchased it.

Posted about 1 month ago

I need some help. When I open the swf generated file it works ok, but when embeded in html the countdown show for a about a nanosecond and disappears.

Posted about 1 month ago

I like this script, but i wanted to know if it’s possible to integrate some function like:

I want to put like 30 items or more in the xml file but only show 8 items on the swf file. I want to add an external jpg image, tile (is now inlcude) but I need a description to put a short description.

I can pay for it and you can sell it like other product, let me know please.
Posted about 1 month ago