# Trace an Array from an element

**URL:** <https://forum.kirupa.com/t/trace-an-array-from-an-element/320700>\
**Category:** flash\
**Created:** [March 30, 2011, 8:37pm UTC](https://forum.kirupa.com/t/trace-an-array-from-an-element/320700 "2011-03-30T20:37:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nephi\_05](https://avatars.discourse-cdn.com/v4/letter/n/48db29/32.png) [@nephi\_05](https://forum.kirupa.com/u/nephi_05)\
**Post date:** [March 30, 2011, 8:37pm UTC](https://forum.kirupa.com/t/trace-an-array-from-an-element/320700/1 "2011-03-30T20:37:46Z")

</div>

I’m making a test. There are multiple questions on the screen at once. What I’m going to do is have each answer choice for a question in an array for each question and each answer choice will have a mouse click event listener. That listener will call a function that will highlight the selected option.  
Here’s where my problem comes up. I don’t want them to be able to select multiple choices, so when they select a different answer choice, within the same problem, the highlight needs to move from their previous choice to the new choice. How do I best do this? I was wondering if there was a way to find out what array a selected element belongs to.
