# Setinterval / updateAfterEvent pb

**URL:** <https://forum.kirupa.com/t/setinterval-updateafterevent-pb/125535>\
**Category:** Uncategorized\
**Created:** [October 14, 2004, 3:52pm UTC](https://forum.kirupa.com/t/setinterval-updateafterevent-pb/125535 "2004-10-14T15:52:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uli](https://avatars.discourse-cdn.com/v4/letter/u/ccd318/32.png) [@Uli](https://forum.kirupa.com/u/Uli)\
**Post date:** [October 14, 2004, 3:52pm UTC](https://forum.kirupa.com/t/setinterval-updateafterevent-pb/125535/1 "2004-10-14T15:52:06Z")

</div>

Hello!

I have a “slide” function that slides a MC for let’s say 150 px. I call that function every 5 sec with the SetInterval function.

slide = function(){//my movement here (a loop until it reaches the wanted position); updateAfterEvent}  
setInterval(slide; 5000);

the things is, when i run the function without setInterval, it works perfectly. But when i setInterval and even if i added a updateAfterEvent(), it still won’t slide but only move to the final position of the sliding… So why doesn’t it refresh the display??

TiA 🙂
