# Can a variable be defined by what it isn't?

**URL:** https://forum.kirupa.com/t/can-a-variable-be-defined-by-what-it-isnt/207723
**Category:** flash
**Created:** [November 20, 2006, 11:16pm UTC](https://forum.kirupa.com/t/can-a-variable-be-defined-by-what-it-isnt/207723 "2006-11-20T23:16:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![learntoreed](https://avatars.discourse-cdn.com/v4/letter/l/ecb155/32.png) [@learntoreed](https://forum.kirupa.com/u/learntoreed)
#### Post date: [November 20, 2006, 11:16pm UTC](https://forum.kirupa.com/t/can-a-variable-be-defined-by-what-it-isnt/207723/1 "2006-11-20T23:16:48Z")

</div>

I’ve created a number of MCs titled btn1, btn2, etc… for an XML MP3 player. Each MC lies behind a track name, derived from the XML file. Once clicked, the player skips to that particular song, and the corresponding MC beneath changes to a darker color to show which song is playing.

Fairly simple, but because I am also using forward and backward buttons, I am defining the MC names through a variable number.

When the forward button is pressed for example, I have it add one to the variable, and perform this function: eval(“btn”+i).gotoAndPlay(2) (along with the other functions to play the next song). This does the trick in terms of getting the next button to highlight for the corresponding song.

But what I would like to do is also have a single function that tells every other button to go back to it’s original state. Is there a way to define this somehow by saying  
“everything that is not” eval(“btn”+i).gotoAndStop(1)?

I hope that makes sense. I have the feeling there’s probably something fairly rudimentary that I’m missing here. I am very grateful for anyone’s help on this matter!

Thank you!

:huh:  
aaron
