Oh yes I do this kind of thing all the time.
I'd use only ActionScript to accomplish this though - everything dynamic, nothing on the Stage/Timeline... Anyway, here's how, using the Timeline approach.
1. Go to Timeline and name the layer as, say, "Map".
2. Select the frame 1 of the layer "Map", and draw something on Stage. A blue square will do.
3. Select the blue square on Stage and press F8 key. "Convert to Symbol" box appears. Convert it to a MovieClip and name it to, say, "mcMap".
4. Ensure the blue square is still selected, then go to "Properties" panel and change the Instance Name to "mcMap". Now you have a MopvieClip instance called "mcMap" on Stage in the frame 1 of the Timeline layer "Map".
5. Lock the Timeline layer "Map" so that you won't to mess up with "mcMap".
6. Create a new layer above the "map" layer, and call it, say, "Interest".
7. Select the frame 1 of the layer "Interest", and draw something on Stage. A red circle will do.
8. Select the red circle on Stage and press F8 key to convert it to a MovieClip and name it to, say, "mcInterest".
9. Ensure the red circle is still selected, then go to "Properties" panel and change the Instance Name to "mcInterest". Now you have a MopvieClip instance called "mcInterest" in the frame 1 of the Timeline layer "Interest".
10. Create another layer and name it "Button".
11. Select the frame 1 of the layer "Button", and then drag a Button component from Components panel to the Stage.
12. Go to Properties panel and name the Button component instance to "btn".
Now, let's move on to scripting.
13. Create a new layer and name it "Actions".
14. Select the frame 1 of "Actions" layer.
15. Go to "Actions" panel. Make sure the panel says "Actions - Frame".
Then type in the following:
Code:
mcInterest._visible = false;
btn.onPress = function():Void {
mcInterest._visible = !mcInterest._visible;
};
stop();
That's basically it.
Kenneth Kawamoto