# Function that wait's 5 seconds and runs anothr function

**URL:** <https://forum.kirupa.com/t/function-that-waits-5-seconds-and-runs-anothr-function/255535>\
**Category:** Uncategorized\
**Created:** [March 24, 2008, 3:58pm UTC](https://forum.kirupa.com/t/function-that-waits-5-seconds-and-runs-anothr-function/255535 "2008-03-24T15:58:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mario18](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mario18](https://forum.kirupa.com/u/Mario18)\
**Post date:** [March 24, 2008, 3:58pm UTC](https://forum.kirupa.com/t/function-that-waits-5-seconds-and-runs-anothr-function/255535/1 "2008-03-24T15:58:02Z")

</div>

hy…I want to make a function that waits 5 seconds, after that to run another function that changes the content (changeContent) to the next label

this is all i managed to do…I hope it’s wright

function autorun() {  
if (button\_label = 0) {  
changeContent(1);  
} else if (button\_label = 1) {  
changeContent(2);  
} else if (button\_label = 2 ) {  
changeContent(3);  
} else if (button\_label = 3) {  
changeContent(4);  
} else if (button\_label = 4) {  
changeContent(5);  
} else if (button\_label = 5) {  
changeContent(0);  
}  
}

I need this in AS2.0…  
Can someone help me? Thanks!
