# Countdown Timer with User Input!

**URL:** https://forum.kirupa.com/t/countdown-timer-with-user-input/280722
**Category:** flash
**Created:** [January 30, 2009, 7:00pm UTC](https://forum.kirupa.com/t/countdown-timer-with-user-input/280722 "2009-01-30T19:00:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![adefesche](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@adefesche](https://forum.kirupa.com/u/adefesche)
#### Post date: [January 30, 2009, 7:00pm UTC](https://forum.kirupa.com/t/countdown-timer-with-user-input/280722/1 "2009-01-30T19:00:36Z")

</div>

I might be a complete newbie at this, but I can’t seem to find a tutorial or anything on how to do what I’m trying to do.

Ultimately I want to create a countdown for a widget where the user can put in a date and the app will countdown to that date. But the trick is–how do I insert the user variables into the actionscript for the countdown?

The script for the countdown is like this:  
[LEFT]

```auto
currentDate = new Date();
thisYear = currentDate.getFullYear();

eventDate = new Date(2009, 11, 25);
eventMillisecs = eventDate.getTime();

```

[/LEFT]

But, I want to be able to pull in user variables for “eventDate = new Date(Year, Month, Day)” Is this possible and if so, how?
