# Using variable value as object name... help!

**URL:** <https://forum.kirupa.com/t/using-variable-value-as-object-name-help/192937>\
**Category:** flash\
**Created:** [July 3, 2006, 1:37am UTC](https://forum.kirupa.com/t/using-variable-value-as-object-name-help/192937 "2006-07-03T01:37:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![logikal2](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/logikal2/32/1143_2.png) [@logikal2](https://forum.kirupa.com/u/logikal2)\
**Post date:** [July 3, 2006, 1:37am UTC](https://forum.kirupa.com/t/using-variable-value-as-object-name-help/192937/1 "2006-07-03T01:37:26Z")

</div>

This shouldn’t be too hard for someone with a little more experience…

[AS]  
stuff = setInterval(“fun”,20);  
myVar = “stuff”;  
clearInterval(myVar);  
[/AS]

Obviously, the above clearInterval won’t work, because **the clearInterval looks for “myVar” instead of “stuff”**. I want it to be the other way around.

I tried using the following, but with no luck.  
[AS]clearInterval(this[myVar]);  
clearInterval(\_root[myVar]);[/AS]
