# setTimeout() problem

**URL:** <https://forum.kirupa.com/t/settimeout-problem/276769>\
**Category:** flash\
**Created:** [December 3, 2008, 1:29pm UTC](https://forum.kirupa.com/t/settimeout-problem/276769 "2008-12-03T13:29:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoooom](https://avatars.discourse-cdn.com/v4/letter/z/9dc877/32.png) [@zoooom](https://forum.kirupa.com/u/zoooom)\
**Post date:** [December 3, 2008, 1:29pm UTC](https://forum.kirupa.com/t/settimeout-problem/276769/1 "2008-12-03T13:29:00Z")

</div>

Hi there,

just wondering if anyone could assist me. I am using setTimeout() to call a function called “finished” after a 1000ms pause, which works absolutely fine until I try to pass a variable with it.

```auto
setTimeout(finished, 1000);

```

works absolutely fine.

```auto
endex_txt = "Well done";
setTimeout(finished(endex_txt), 1000);

```

calls the “finished” function, and passes the variable “endex\_txt”, but there is no 1000ms delay, very strange! I can only think that I’ve formatted it wrong. If anyone has any ideas please let me know! I am using Flash CS3 Pro.

Thanks.
