3 Replies Latest reply on Dec 19, 2007 4:42 PM by Twinbird24

    question about _root

    DZ-015
      Hey

      I have a situation where movieclip A contains movieclip B which contains movieclip C.

      Movieclip C calls for a variable at ... _root.myVar, and rather than finding the variable at the root of A, I want it to find the variable at the root of B.

      Any tips for me?

      Thanks!!
        • 1. Re: question about _root
          Level 7
          try using _parent


          --
          Dan Smith > adobe community expert
          http://www.dsmith.tv


          "DZ-015" <webforumsuser@macromedia.com> wrote in message
          news:fkcamv$905$1@forums.macromedia.com...
          > Hey
          >
          > I have a situation where movieclip A contains movieclip B which contains
          > movieclip C.
          >
          > Movieclip C calls for a variable at ... _root.myVar, and rather than
          > finding
          > the variable at the root of A, I want it to find the variable at the root
          > of B.
          >
          > Any tips for me?
          >
          > Thanks!!
          >


          • 2. Re: question about _root
            DZ-015 Level 1
            unfortunately that's no good... C is being loaded dynamically - so whatever I do I need to do from A or B. So - is there something I can do from A that will make B treat anything inside it as if B itself is the root...?
            • 3. question about _root
              Twinbird24 Level 1
              try something like:

              _root.movieClipA.movieClipB.myVarialbe

              or

              var rootC = _root.movieClipA.movieClipB

              so that way when you type rootC it looks for the variable or something in the movieClipC timeline. If you declare the variable in the main timeline you may need to write it like this then:


              _root.rootC //so it knows where to find the rootC variable