# setInterval question

**URL:** <https://forum.kirupa.com/t/setinterval-question/179647>\
**Category:** Uncategorized\
**Created:** [February 21, 2006, 11:45pm UTC](https://forum.kirupa.com/t/setinterval-question/179647 "2006-02-21T23:45:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ice987](https://avatars.discourse-cdn.com/v4/letter/i/779978/32.png) [@ice987](https://forum.kirupa.com/u/ice987)\
**Post date:** [February 21, 2006, 11:45pm UTC](https://forum.kirupa.com/t/setinterval-question/179647/1 "2006-02-21T23:45:42Z")

</div>

I’m trying to delay a function which then sets the onEnterFrame of a clip

The colde I am trying will not work

var i=0;  
var delayID=setInterval(setUp,100);

function setUp(){  
clearInterval(delayID);  
this.onEnterFrame=function(){trace(i++);};}

how can I fix this
