# On Press - accessing buttons created with a loop

**URL:** <https://forum.kirupa.com/t/on-press-accessing-buttons-created-with-a-loop/239944>\
**Category:** Uncategorized\
**Created:** [September 27, 2007, 2:29pm UTC](https://forum.kirupa.com/t/on-press-accessing-buttons-created-with-a-loop/239944 "2007-09-27T14:29:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![charles\_i](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/charles_i/32/2986_2.png) [@charles\_i](https://forum.kirupa.com/u/charles_i)\
**Post date:** [September 27, 2007, 2:29pm UTC](https://forum.kirupa.com/t/on-press-accessing-buttons-created-with-a-loop/239944/1 "2007-09-27T14:29:23Z")

</div>

I have generated a series of buttons using this:

```auto
      duplicateMovieClip(sign, "sign"+z, z) 

```

while still inside the loop that is creating the buttons I can get to each sign:

```auto

     _root["sign"+z]._xscale = 240; 

```

etc.

So, once the signs are on the stage - how do I determine which sign is clicked?

```auto
      on (press){
          trace(this._root.sign)
} 

```

results in this …\_level0.sign… instead of say, …\_level0.sign0…  
obviously because there is no loop.

Trying to access \_name does the same.

Thanks  
Charles
