2 Replies Latest reply on May 21, 2006 9:49 AM by NSurveyor

    what will _root._width return?

      All the time I think _root._width will return the value just like Stage.width, but it seems like that's not right.
      If I put a mc on the stage, the _root._width will return the width of the mc, If I put one more shape on the stage, it will return the value of the multi-shape, so I am confused what's the meaning of _root and what's _root.property will return.
      Thanx for ur replies.
        • 1. Re: what will _root._width return?
          Rothrock Level 5
          Why are you confused. You have stated what it does and that is how it works.

          Your confusion is in thinking that the _root object and the Stage object are the same thing. Not to be harsh, but you can see that they aren't spelled the same? Right?

          If you want the width of the Stage then use that. If you want the width of the contents of _root at a specific time then check the _width.

          Where is the confusion?
          • 2. Re: what will _root._width return?
            NSurveyor Level 2
            _root is essentially a movieclip.... the highest clip in a level. So, like any movieclip, it's _width is defined by it's contents. The wider the content, the greater the _width property.

            Now Stage is basically your viewing area... imagine a small circle in a box. The box's dimensions are Stage.width and Stage.height and the dimensions of the circle are _root._width and _root.height... hope that makes at least a little bit of sense. It gets a bit more complicated with alignment of the Stage and scaling of the Stage..