[mx]Getting nested clips to go to a designated frame label
I have a main movie clip (within another clip) containing a number of sub clips which are used as buttons.
I wanted to loop through the buttons in the movie clip & go to and stop at the relevant frame of the holding clip dependant on which button is pressed. Each button (clip) has a property called “monica” that gives the frame label of the frame that buttons release action should go & stop So I have something like this to set the values:
_root.hold_mc.serButs_mc.pearl_mc.monica = "pearl";
_root.hold_mc.serButs_mc.topaz_mc.monica = "topaz";
_root.hold_mc.serButs_mc.diamond_mc.monica = "sapphire";
And then this to make the whole thing work.
for (i in _root.hold_mc.serButs_mc) {
_root.hold_mc.serButs_mc[i].onRelease = function() {
_root.hold_mc.goToAndStop(_root.hold_mc.serButs_mc[i].monica)
};
}
but it don't work. Any idea how I can go about this?