# How to access object properties in an array?

**URL:** <https://forum.kirupa.com/t/how-to-access-object-properties-in-an-array/251012>\
**Category:** flash\
**Created:** [February 4, 2008, 4:15pm UTC](https://forum.kirupa.com/t/how-to-access-object-properties-in-an-array/251012 "2008-02-04T16:15:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brother\_Gabriel](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/brother_gabriel/32/3665_2.png) [@Brother\_Gabriel](https://forum.kirupa.com/u/Brother_Gabriel)\
**Post date:** [February 4, 2008, 4:15pm UTC](https://forum.kirupa.com/t/how-to-access-object-properties-in-an-array/251012/1 "2008-02-04T16:15:01Z")

</div>

Greetings all!

I have 50 buttons on the screen. I want to make them visible and invisible in groups. So I have created several different arrays where the objects in the arrays are instances of those same named buttons:

myArray = newArray()  
myArray[0] = button1  
myArray[1] = button2  
myArray[3] = button3  
etc… up to button50

How can I change all the buttons’ properties in the array at the same time to .\_visible = false ?  
I can change them one at a time like this:  
myArray[1].\_visible = false

But I want to change them all. I tried:  
myArray.\_visible=false  
but nothing at all happens.

Please help!

-Brother Gabriel-Marie
