# \[help! as2\] how to access movie clips' \_y inside a movie clip

**URL:** <https://forum.kirupa.com/t/help-as2-how-to-access-movie-clips--y-inside-a-movie-clip/229120>\
**Category:** flash\
**Created:** [June 14, 2007, 8:33am UTC](https://forum.kirupa.com/t/help-as2-how-to-access-movie-clips--y-inside-a-movie-clip/229120 "2007-06-14T08:33:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mentega](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@mentega](https://forum.kirupa.com/u/mentega)\
**Post date:** [June 14, 2007, 8:33am UTC](https://forum.kirupa.com/t/help-as2-how-to-access-movie-clips--y-inside-a-movie-clip/229120/1 "2007-06-14T08:33:16Z")

</div>

i got a school flash project where i need to access the \_y properties of many movie clips buttons that set with name like sel 1 sel2 sel 3 and so on

the problem is i have 2 sets of those, one on the main timeline which i can access with “for” looped \_root[“sel”+i].\_y and one which is inside another movieclip

problem is i don’t know how to access the later using for loop ☹ can someone help me with that?

this is the script that i used to access the \_y on the \_root.selx

```auto
for (i=1; i<numberOfButtons+1; i++) {
  if ((mySelection == i)&&(this._y != _root["sel"+i]._y)) {
    this._y = _root["sel"+i]._y;
  }
 }

```

anyone can help? please :nerd: :nerd: _begging_:nerd: :nerd:
