# Assign x and y coordinates to an array?

**URL:** <https://forum.kirupa.com/t/assign-x-and-y-coordinates-to-an-array/260276>\
**Category:** Uncategorized\
**Created:** [May 14, 2008, 2:33am UTC](https://forum.kirupa.com/t/assign-x-and-y-coordinates-to-an-array/260276 "2008-05-14T02:33:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkhippothewis](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@darkhippothewis](https://forum.kirupa.com/u/darkhippothewis)\
**Post date:** [May 14, 2008, 2:33am UTC](https://forum.kirupa.com/t/assign-x-and-y-coordinates-to-an-array/260276/1 "2008-05-14T02:33:51Z")

</div>

Hi guys,

I’m pretty new to actionscript.

I have an outline of a human body. When the user would click on one part of the body (x y coordinates) it would return the name of that part of the body? I’m assuming i would be using an array in this instance.

Just would like to know how you can assign x and y coordinates to an array?

---

<div class="post-metadata">

**Author:** ![souled](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@souled](https://forum.kirupa.com/u/souled)\
**Post date:** [May 14, 2008, 3:17pm UTC](https://forum.kirupa.com/t/assign-x-and-y-coordinates-to-an-array/260276/2 "2008-05-14T15:17:25Z")

</div>

Yo wouldn’t really need to use an array. Each part of the body should be a movie clip with an instance name and then do for example:

**if (arm.hitTest(\_xmouse, \_ymouse, true)) {  
trace(“Arm”);  
}**

---

<div class="post-metadata">

**Author:** ![darkhippothewis](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@darkhippothewis](https://forum.kirupa.com/u/darkhippothewis)\
**Post date:** [May 16, 2008, 6:48am UTC](https://forum.kirupa.com/t/assign-x-and-y-coordinates-to-an-array/260276/3 "2008-05-16T06:48:44Z")

</div>

Thanks for your help. I think i’ve got what i need to continue.
