Copy link to clipboard
Copied
Hello, I was wondering how do you express hierarchy? I want to affect the visibility of a symbol in a group inside another group on one of my layers, thanks.
THe groups will have to be in the form of movieclips. If group1 is the name of the movieclip that contains the group2 movieclip, and group2 contains the movieclip symbol, then to target that symbol from the group1 timeline you can use...
group1.group2.symbol.visible = true; // or false
Where those are instance names assigned to the objects on teh stage.
Copy link to clipboard
Copied
THe groups will have to be in the form of movieclips. If group1 is the name of the movieclip that contains the group2 movieclip, and group2 contains the movieclip symbol, then to target that symbol from the group1 timeline you can use...
group1.group2.symbol.visible = true; // or false
Where those are instance names assigned to the objects on teh stage.
Copy link to clipboard
Copied
same goes to assign the layer? meaning if a symbol on layer 1 affects the visibility of symbol2 when clicked, symbol2 being on layer2 in group1.group2. ...
Copy link to clipboard
Copied
Layers are irrelevant to actionscript. They provide you with options as to how to arrange objects but cannot be affected by code, although you can rip an object out of a layer using code (addChild()) disconnects an object from its parent timeline).
The only way you woukld affcet the visibility of symbol2 if you attacked symbol1 would be if symbol2 was inside symbol1