# Variable Object Referencing

**URL:** <https://forum.kirupa.com/t/variable-object-referencing/229166>\
**Category:** flash\
**Created:** [June 14, 2007, 4:23pm UTC](https://forum.kirupa.com/t/variable-object-referencing/229166 "2007-06-14T16:23:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![malahverdian](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/malahverdian/32/3732_2.png) [@malahverdian](https://forum.kirupa.com/u/malahverdian)\
**Post date:** [June 14, 2007, 4:23pm UTC](https://forum.kirupa.com/t/variable-object-referencing/229166/1 "2007-06-14T16:23:18Z")

</div>

Hello, I just stumbled across your forums today looking for an answer to my question on Google.

I am in no way very knowledgable with ActionScript, so this might be very simple and I am looking in all of the wrong places… but basically here is my issue:

Instead of accessing an objects attributes like this, \_level0.thumbnails.thumbnail0.\_width = 500;

I want to be able to access it with \_level0.thumbnails. (this.id) .\_width = 500;

where as (this.id) is a variable that could be equal to “thumbnail0” or “thumbnail99” depending on which object gets clicked. I have everything working to if I hardcode thumbnail0 it works fine, and this.id does get set to whatever thumbnail I click’s “thumbnail” + ID

… any help?
