I have a button called "btn01" on main timeline with the following actionscript;

btn01.onRelease = function() {_root.map_mc.gotoAndStop("map01");}

I also have a map on the maintimeline with 50 state buttons with the following actionscript;

on (release) {
_root.gotoAndPlay(3);
_root.mc_allstates.gotoAndStop("Washington");
_root.state_no=0;
A_fg_allstates.gotoAndStop("Washington");
state_now="Washington"
trace (state_now);

}



I have a declared variable "state_now" that gets updated when the above buttons are clicked with current State Name. I have traced it and it is working.

On the main timeline is a MC "A_fg_allstates" with 50 key frames labeled all 50 of the US states. What I need is to get btn01 to advance to the labeled frame in A_fg_allstates using the variable populated by clicking the state button above.

Hope that makes sence, basically how do I use a variable to define the labeled frame in a MC to advance to on click.