Flash counter problem

hi,
i’m trying to create a flash counter.
each time the movie clip is loaded, it loads an external variable (number of seconds).

so lets say the variable is:

secondsToEnd = 260;

the timer will be working until it gets to zero, then the movie clip will go to frame number 2.
after a refresh of the page, the “banner” will check again for a new xml variable.

i will need help on creating the counter (after receiving the variable secondsToEnd) till it gets to zero.

any help will be appreciated.
thanks in advance.

WebMaster.