# Simple way to check which btn is the selected one

**URL:** https://forum.kirupa.com/t/simple-way-to-check-which-btn-is-the-selected-one/245857
**Category:** Uncategorized
**Created:** [December 4, 2007, 10:08pm UTC](https://forum.kirupa.com/t/simple-way-to-check-which-btn-is-the-selected-one/245857 "2007-12-04T22:08:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ddd\_estudio](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@ddd\_estudio](https://forum.kirupa.com/u/ddd_estudio)
#### Post date: [December 4, 2007, 10:08pm UTC](https://forum.kirupa.com/t/simple-way-to-check-which-btn-is-the-selected-one/245857/1 "2007-12-04T22:08:21Z")

</div>

hi folks,  
again trying to code mcs as buttons in a menu bar, i need specific help with the code below:

```auto
btnIdent05.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler);

```

```auto
function onRollOverHandler(myEvent:MouseEvent){
    trace("Over");
    // check if this button is selected: HOW TO ???
}

```

how to check if the btn is the selected one (to prevent it from behaving as if it wasn’t, ex going to the out state in OVER and OUT) ?

many thanks!  
ddd\_estudio
