# Timing a function

**URL:** <https://forum.kirupa.com/t/timing-a-function/101688>\
**Category:** Uncategorized\
**Created:** [February 12, 2004, 8:48pm UTC](https://forum.kirupa.com/t/timing-a-function/101688 "2004-02-12T20:48:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![larcho](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@larcho](https://forum.kirupa.com/u/larcho)\
**Post date:** [February 12, 2004, 8:48pm UTC](https://forum.kirupa.com/t/timing-a-function/101688/1 "2004-02-12T20:48:34Z")

</div>

How can I delay this function to happen 5 seconds AFTER I rolled my mouse over:

[AS]  
on (rollOver) {  
\_root.mc\_fotos.onEnterFrame = function() {  
this.\_x -= ((this.\_x + 2800) / 4);  
}  
}  
[/AS]

Thanks
