# Executing scripts at certain time?

**URL:** <https://forum.kirupa.com/t/executing-scripts-at-certain-time/241090>\
**Category:** flash\
**Created:** [October 9, 2007, 10:54pm UTC](https://forum.kirupa.com/t/executing-scripts-at-certain-time/241090 "2007-10-09T22:54:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mistykal](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Mistykal](https://forum.kirupa.com/u/Mistykal)\
**Post date:** [October 9, 2007, 10:54pm UTC](https://forum.kirupa.com/t/executing-scripts-at-certain-time/241090/1 "2007-10-09T22:54:58Z")

</div>

I have a bunch of tweens and scripts that i’d like to execute (to animate my stage using actionscript), but if i just list them normally in a function, they will naturally all perform at the same time.

```auto
function whatIneedToDo() {
 doTween1();
 doTween2();
 loadSomeVars();
 doTween3();
 etc();
}

```

Is there a simple way to make actionscript wait a certain time before moving on to the next function?

like:

```auto
doTween1();
wait(100ms);
doTween2();

```

Or is writing listeners and functions for each tween the only way?  
What about the new copy motion to AS3 function, could that be of any use in this case?

Thanks in advance.
