# Automatic Timer Events

**URL:** <https://forum.kirupa.com/t/automatic-timer-events/287962>\
**Category:** flash\
**Created:** [May 8, 2009, 3:41pm UTC](https://forum.kirupa.com/t/automatic-timer-events/287962 "2009-05-08T15:41:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alemieux34](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@alemieux34](https://forum.kirupa.com/u/alemieux34)\
**Post date:** [May 8, 2009, 3:41pm UTC](https://forum.kirupa.com/t/automatic-timer-events/287962/1 "2009-05-08T15:41:11Z")

</div>

I’m trying to automatically set up a rotating animation via the Timer Event. There’s a Movie Clip called main\_mc that’s X position is changed with a Tween.

Can the Timer Event run multiple events or is it only 1 per Timer?

```auto
var auotT:Timer = new Timer(5000);
autoT.addEventListener(TimerEvent.TIMER, onAuto);
autoT.start();

function onAuto(evt:TimerEvent):void {
  if (some condition exists) {
     play first part
  }
  else if (some other condition exists) {
     play second part
  }
  etc...

}

```

Or do I have to create a timer event for each part?
