• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Newbie Question

New Here ,
Apr 14, 2012 Apr 14, 2012

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.

TOPICS
ActionScript

Views

521

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 14, 2012 Apr 14, 2012

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.

Votes

Translate

Translate
LEGEND ,
Apr 14, 2012 Apr 14, 2012

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 14, 2012 Apr 14, 2012

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. ... 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 14, 2012 Apr 14, 2012

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines