# How to store a reference to a previously selected target?

**URL:** <https://forum.kirupa.com/t/how-to-store-a-reference-to-a-previously-selected-target/279626>\
**Category:** Uncategorized\
**Created:** [January 16, 2009, 5:56pm UTC](https://forum.kirupa.com/t/how-to-store-a-reference-to-a-previously-selected-target/279626 "2009-01-16T17:56:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![regbolD](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@regbolD](https://forum.kirupa.com/u/regbolD)\
**Post date:** [January 16, 2009, 5:56pm UTC](https://forum.kirupa.com/t/how-to-store-a-reference-to-a-previously-selected-target/279626/1 "2009-01-16T17:56:34Z")

</div>

is there a way?  
for example if i have “normal” function for a button click:  
function clikcMenu(e:MouseEvent):void {  
e.target.something = whatever;  
}  
and if i click on some button in my menu, the next time i click again on some other button in my menu, how could i refer to previously clicked button (target) ?
