# Getting a buttons \_x

**URL:** <https://forum.kirupa.com/t/getting-a-buttons--x/112676>\
**Category:** Uncategorized\
**Created:** [June 10, 2004, 9:16am UTC](https://forum.kirupa.com/t/getting-a-buttons--x/112676 "2004-06-10T09:16:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eze](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@eze](https://forum.kirupa.com/u/eze)\
**Post date:** [June 10, 2004, 9:16am UTC](https://forum.kirupa.com/t/getting-a-buttons--x/112676/1 "2004-06-10T09:16:47Z")

</div>

hi, I have been trying to get a button’s \_x using this.\_x in the buttons action thingy, but it returns the \_root’s \_x. Hmm it works with button\_1.\_x of course but i dont get it, i read this only works for movie clips? if so any other way of getting a buttons \_x? thanks in advance:D

Josh.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 11, 2004, 9:44pm UTC](https://forum.kirupa.com/t/getting-a-buttons--x/112676/2 "2004-06-11T21:44:49Z")

</div>

LOL, no, i’m really not. I have Ilyas and Senocular to thank for most of what I know.

But while we are at it…

```auto
button_array = new Array(b1,b2,b3,soOn);

```

can be rewritten as

```auto
button_array = [b1,b2,b3,soOn];

```

Since [] signifies an array. You can even replace just the regular empty array of

```auto
myArray = new Array();

```

with

```auto
myArray = [];

```

You can do the same for objects.

```auto
myOBJ = new Object();

```

can be replaced with

```auto
myOBJ = {};

```
