# Variable issues

**URL:** <https://forum.kirupa.com/t/variable-issues/173731>\
**Category:** flash\
**Created:** [December 29, 2005, 3:07am UTC](https://forum.kirupa.com/t/variable-issues/173731 "2005-12-29T03:07:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kingofnukes](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@kingofnukes](https://forum.kirupa.com/u/kingofnukes)\
**Post date:** [December 29, 2005, 3:07am UTC](https://forum.kirupa.com/t/variable-issues/173731/1 "2005-12-29T03:07:04Z")

</div>

I haven’t seen this done before but I wanted to try and make an easier script for myself.

instead of having button that states a variable then plays an animation, while the animation has a code saying " if ("variable == “number”) {  
do something  
}  
a million times for each possible variable outcome, I wanted to do a script where the number sets a worded variable instead of a number, then have a code on the MC say something like: onClipEvent(enterframe) {  
gotoAndStop(“number”)  
}

basically the button setting a word as a varible set as “number” which number will be the MC’s frame labels.

How would I set up the button’s code?

Sorry if i’m being too vauge.
