# setInterval

**URL:** <https://forum.kirupa.com/t/setinterval/199973>\
**Category:** Uncategorized\
**Created:** [September 7, 2006, 4:54pm UTC](https://forum.kirupa.com/t/setinterval/199973 "2006-09-07T16:54:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![modelreject](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@modelreject](https://forum.kirupa.com/u/modelreject)\
**Post date:** [September 7, 2006, 4:54pm UTC](https://forum.kirupa.com/t/setinterval/199973/1 "2006-09-07T16:54:19Z")

</div>

Hello,  
I was wondering if you could help me out.  
I have thisbit of code…When you roll over the “scrubber\_mc” it updates a text field called “time”. The problem is that you have to rollOut and then roll back onto the “scrubber\_mc” to update the “time” text field.  
What I would like is for “pos” to be triggered by setInterval so the it updates as I move along the “scrubber\_mc”, so I don’t have to move off and on again.

scrubber\_mc.onRollOver = function() {  
var pos = this.\_xmouse/100;  
snd.position = Math.min(snd.\_sound.duration, pos\*snd.\_sound.duration/snd.loaded);  
time.text = formatTime(snd.position);  
};

Thankyou for any help.  
M
