# Timer Controlled Events

**URL:** <https://forum.kirupa.com/t/timer-controlled-events/190914>\
**Category:** flash\
**Created:** [June 15, 2006, 4:47pm UTC](https://forum.kirupa.com/t/timer-controlled-events/190914 "2006-06-15T16:47:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roob](https://avatars.discourse-cdn.com/v4/letter/r/b782af/32.png) [@roob](https://forum.kirupa.com/u/roob)\
**Post date:** [June 15, 2006, 4:47pm UTC](https://forum.kirupa.com/t/timer-controlled-events/190914/1 "2006-06-15T16:47:58Z")

</div>

I’m creating a small flash file with a sunrise and sunset. Now, I want these to happen every 30 seconds but I can’t, for the life of me, work out how to do this using a timer function. Has anyone got any ideas?

What I need is after the first 30 seconds then the variable timeSunset = 1 and a further 30 seconds after that makes the variable timeSunrise = 1. This process needs to be kept going around in a loop with a 30 second gap between sunrise and sunset.
