[RESOLVED] AS2 button scope help needed MC inside MC
I have a Movieclip on the main timeline called "map_mc" as you might guess inside this movieclip is a map of the US and each state is a button.
Also in "map_mc" is a movieclip called "A_fg_allstates" with 50 labeled frames one for each state ie. MD, MO, OH, IL, CA etc.
When you click on the state or button on the map in "map_mc" I need to advance to a labeled frame in "A_fg_allstates" such as Texas Ohio, Ilinois, Maryland etc.
I cannot seem to get the scope right, can anyone help?
Here is the code I have on the button now:
Code:
on (release) {
_root.gotoAndPlay(3);
_root.state_no=18;
A_fg_allstates.gotoAndStop("Texas");
wow would love to but the file is way too big, I could email or maybe try to streamline the file so I can post the part I need help with, Thanks Fruitbeard
I am trying to get this FLA down to an acceptable size for the forum, checked the name and no typos there. I will post a little later as soon as I can get it down in size, Thanks Fruitbeard
I attached a zip file. FLA CS4 and XML. I had to strip down the FLA a lot to get it small enough to upload here, so it will seem incomplete when you compile and run. That being said; There is one MC on the main timeline called map_mc inside it are
1) 5 labeled keyframes for 5 different map views (not all are in this copy)
2) 1 unique MC on each key frame (blue bar with text not all present)
If you can get the "TEXAS button "Texas_FG" in "map_mc" on frame one to advance "MC A_fg_allstates" to keyframe labeled "Texas" that would solve all my problems. I have tried _root, _parent, nothing seems to work.
I know there are easy ways to fix by breaking up MC structure but that is not an option.
You have to go inside your map_mc movieclip and put instance name A_fg_allstates in the last movieclip (the one that holds the states names)
Then on each button put this line in the onRelease : A_fg_allstates.gotoAndStop("Texas"); Where you change Texas for the name of each state. This works to me with your fla. Let me know
Last edited by angelhdz; 11-29-2012 at 06:56 PM.
Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries