# Accessing a property?

**URL:** <https://forum.kirupa.com/t/accessing-a-property/325542>\
**Category:** flash\
**Created:** [October 21, 2011, 5:46pm UTC](https://forum.kirupa.com/t/accessing-a-property/325542 "2011-10-21T17:46:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronmac](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@ronmac](https://forum.kirupa.com/u/ronmac)\
**Post date:** [October 21, 2011, 5:46pm UTC](https://forum.kirupa.com/t/accessing-a-property/325542/1 "2011-10-21T17:46:01Z")

</div>

I’m having a small problem here.

I’m attaching an array of objects to the stage, each with a size, x and y values. I have 2 values for the y property (y1 and y2).

So when I attach the objects to the stage y property takes the y1 values. When I want to change the y value to y2 nothing happens:

for (i=numChildren-1; i\>=0; i–) {  
getChildAt(i).y=y2;  
}

Is this the correct way of doing it?

Thanks in advance.
