# Referencing objects by name created at runtime

**URL:** <https://forum.kirupa.com/t/referencing-objects-by-name-created-at-runtime/255828>\
**Category:** flash\
**Created:** [March 27, 2008, 12:36pm UTC](https://forum.kirupa.com/t/referencing-objects-by-name-created-at-runtime/255828 "2008-03-27T12:36:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daidai](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/daidai/32/3087_2.png) [@daidai](https://forum.kirupa.com/u/daidai)\
**Post date:** [March 27, 2008, 12:36pm UTC](https://forum.kirupa.com/t/referencing-objects-by-name-created-at-runtime/255828/1 "2008-03-27T12:36:43Z")

</div>

Referencing objects by name created at runtime, how do you do it?  
Ive remember reading that its tough, but can’t seem to find the work around.  
I have thumbnail objects (with a thumb class) that are created in a loop and added to a thumbholder class, with the name property added (thumb.name, which when traced is thumb0, thumb1, etc). After runtime I want to interact with the thumbs via mouse events in the thumbholder, e.g. when thumb0 is clicked thumb4 is moved to x=60. But trying to reference thumb0 doesnt work and when I reference thumb it will always return the final thumb, e.g. thumb5.
