# onClipEvent(enterFrame) on the timeline

**URL:** <https://forum.kirupa.com/t/onclipevent-enterframe-on-the-timeline/171353>\
**Category:** flash\
**Created:** [December 4, 2005, 7:27pm UTC](https://forum.kirupa.com/t/onclipevent-enterframe-on-the-timeline/171353 "2005-12-04T19:27:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zimmermann](https://avatars.discourse-cdn.com/v4/letter/z/f19dbf/32.png) [@Zimmermann](https://forum.kirupa.com/u/Zimmermann)\
**Post date:** [December 4, 2005, 7:27pm UTC](https://forum.kirupa.com/t/onclipevent-enterframe-on-the-timeline/171353/1 "2005-12-04T19:27:47Z")

</div>

I want to duplicate an MC every 5th second, so I came up with this code:

```auto

i = 100;
p = 0;
onClipEvent(enterFrame){
p++;
if(p>150){
duplicateMovieClip(_root.myMC, "myMC" add _root.i, _root.i);
p=0;
i++;
}
}

```

(placed on the timeline)

I know this doesn’t work, because onClipEvent only works on buttons or MCs. So the question is: is there an onTimelineEvent or something that’d work on the timeline?
