Using Variables as a dynamic address.
So, my code is a bloody mess due to me being new, but bare with me..
I'm trying to create a grid of changeable icons using buttons and named frames, rather than making a unique menu to change each icon, I'm trying to define a variable called hexTarget.
the trouble ensues when I try to reference this target in another MOvie Clip because they're not in the same parent line.
hexTarget is created in MovieClip(root).Grid_mc.Menu_mc
But is set on press in MovieClip(root).Grid_mc.Button1_mc
On press it sets the variable hexTarget to "Button1_mc" and on trace I can see this is working, the trouble I'm having is I don't know how to reference this variable to then go back and set Button1_mc to a certain frame.
PMPL_barren_btn.addEventListener (MouseEvent.MOUSE_DOWN, setHex_PMPL_barren);
function setHex_PMPL_barren (event:MouseEvent):void{
gotoAndStop (1);
//trace(MovieClip(root).Grid_mc.Menu_mc.hexTarget);
MovieClip(root).Grid_mc.Menu_mc.hexTarget.gotoAndStop ('PMPL_barren')
I don't even know if this is possible (But I have had it work in other test fla's where the var is in the same chain of MC's) or if there's a better way to approach this, but I really appreciate any input you peeps might have ![]()

