In-active screen

I am building a quiz for a touch screen. What code would I use to detect when the Flash is not being interacted with? So basically it times out and goes back to the beginning of the movie after say 15 seconds.
Thanks!