# Keeping Track of Answer Clicked

**URL:** <https://forum.kirupa.com/t/keeping-track-of-answer-clicked/274749>\
**Category:** flash\
**Created:** [November 4, 2008, 5:18am UTC](https://forum.kirupa.com/t/keeping-track-of-answer-clicked/274749 "2008-11-04T05:18:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [November 4, 2008, 5:18am UTC](https://forum.kirupa.com/t/keeping-track-of-answer-clicked/274749/1 "2008-11-04T05:18:23Z")

</div>

I’m not sure how this is done with AS 3.0 but when users click on an answer I have a fake radio button that highlights. If the user then changes their mind and clicks on another option I would like the first radio button to turn off and the newly clicked button to highlight instead. I’m not sure how to keep a reference of the item that was last clicked.

```auto

answerSprite.addEventListener(MouseEvent.CLICK,clickAnswer);// Button Listener        

public function clickAnswer(event:MouseEvent) {
            //lastButton.gotoAndStop(1);

            var radioButtonOn:MovieClip = event.currentTarget.getChildByName('radioButton');
            radioButtonOn.gotoAndStop(2);

            //var lastButton:MovieClip = event.currentTarget.getChildByName('radioButton');

        }

```

Has anyone tried something similar with buttons?
