# Holding Instances in an Array

**URL:** https://forum.kirupa.com/t/holding-instances-in-an-array/176478
**Category:** flash
**Created:** [January 24, 2006, 2:41pm UTC](https://forum.kirupa.com/t/holding-instances-in-an-array/176478 "2006-01-24T14:41:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![SAVAGER](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@SAVAGER](https://forum.kirupa.com/u/SAVAGER)
#### Post date: [January 24, 2006, 2:41pm UTC](https://forum.kirupa.com/t/holding-instances-in-an-array/176478/1 "2006-01-24T14:41:49Z")

</div>

[LEFT]I’m working on a project where I have Multiple instances with the same actions.

Instead of typing out

btn1.\_visible = false;  
btn2.\_visible = false;  
btn3.\_visible = false;  
btn4.\_visible = false;

Could I store these instances in an array so that I could minimize my code to something like:

btnArray.\_visible = false;

I’ve tried to do this but it seems to read the instances as strings instead. Someone told me that this was possible once but I forgot the solution.

Thanks for any help  
[/LEFT]
