# Problem with setTimeOut() in AS3

**URL:** <https://forum.kirupa.com/t/problem-with-settimeout-in-as3/238143>\
**Category:** flash\
**Created:** [September 7, 2007, 3:50pm UTC](https://forum.kirupa.com/t/problem-with-settimeout-in-as3/238143 "2007-09-07T15:50:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atris](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@Atris](https://forum.kirupa.com/u/Atris)\
**Post date:** [September 7, 2007, 3:50pm UTC](https://forum.kirupa.com/t/problem-with-settimeout-in-as3/238143/1 "2007-09-07T15:50:23Z")

</div>

Hello all.

In a previous Flash8 app I used the following code to control frame by frame time transitions

function A2SecTimer() {  
setTimeout(this, “gotoAndStop”, 2000, this.\_currentframe + 1);  
}

A2SecTimer();

Now that I’ve upgraded to AS3 this code no longer works.

Any ideas on how I can make this code work for AS3?

Cheers,

~Atris
