Skip navigation
Currently Being Moderated

Newbie Question

Apr 14, 2012 9:43 AM

Tags: #cs5 #script #action_script_3 #actionscript3

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.

  • Currently Being Moderated
    Apr 14, 2012 10:08 AM   in reply to AndreasZach

    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.

    Mark as:
  • Currently Being Moderated
    Apr 14, 2012 11:42 AM   in reply to AndreasZach

    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

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points