# setTimeout cannot find the right scope

**URL:** https://forum.kirupa.com/t/settimeout-cannot-find-the-right-scope/249235
**Category:** flash
**Created:** [January 16, 2008, 8:33pm UTC](https://forum.kirupa.com/t/settimeout-cannot-find-the-right-scope/249235 "2008-01-16T20:33:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kkos](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@kkos](https://forum.kirupa.com/u/kkos)
#### Post date: [January 16, 2008, 8:33pm UTC](https://forum.kirupa.com/t/settimeout-cannot-find-the-right-scope/249235/1 "2008-01-16T20:33:35Z")

</div>

there was another [thread](http://www.kirupa.com/forum/showthread.php?t=274574&highlight=setTimeout) in this forum about a setTimeout and some not working code.

In setTimeout you cannot use the “this” keyword, for instance:

setTimeout(function(){ this.alpha = 0.5}, 2000); // does not work.

Looks like on old AS2 “scope” relict left over in setTimeout AS3.

Does anybody know a workaround for this ( eh…“this”) :huh:

keith
