# Adding a clicked button to an Array/Dictionary

**URL:** <https://forum.kirupa.com/t/adding-a-clicked-button-to-an-array-dictionary/271677>\
**Category:** flash\
**Created:** [September 26, 2008, 9:20am UTC](https://forum.kirupa.com/t/adding-a-clicked-button-to-an-array-dictionary/271677 "2008-09-26T09:20:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raziel](https://avatars.discourse-cdn.com/v4/letter/r/4bbf92/32.png) [@Raziel](https://forum.kirupa.com/u/Raziel)\
**Post date:** [September 26, 2008, 9:20am UTC](https://forum.kirupa.com/t/adding-a-clicked-button-to-an-array-dictionary/271677/1 "2008-09-26T09:20:32Z")

</div>

Hi,

I got 6 buttons on stage, what i want to do is that when you click a button it checks if the button.name exists in the array/dictionary, if it doesn’t it adds the button to the array/dictionary.

Basically i’d end up with 6 entries in the array/dictionary.

But seeing as i’m struggling to make sense of this, i’d appreciate it if people could nudge me in the right direction.

Thanks
