2 Replies Latest reply on Jul 2, 2006 7:09 PM by Newsgroup_User

    _width and _height differences

    aaazzzccc
      I create a filled square with a one pixel line around it. I make the width and height 100 pixels. I create a symbol out of this and then run the debugger. While the flash environment says the square is 100x100, the _width and _height properties equal 101 and 101.
      If I do the same as above but make the line width 5 pixels, then _width and _height report 105 and 105, but the flash environment still reports 100x100.
      If I create a filled square with no outline, then W and H in the flash environment agree with the _width and _height properties in actionscript.
      Can someone explain why there is this difference between when the flash environment reports and what actionscript properties report when I have an outline around a symbol?

      Thanks!

      [Tim]
        • 1. Re: _width and _height differences
          Level 7
          > Can someone explain why there is this difference between when the flash
          > environment reports and what actionscript properties report when I have an
          > outline around a symbol?

          Because script takes the outline/stoke into account and the design
          environment doesn't.
          --
          Jeckyl


          • 2. Re: _width and _height differences
            Level 7
            Since you are treading into using the _width and _height properties I will
            add to Jeckyl's comment, these are dynamic values and can change as objects
            or graphic rendering inside the clip change or move changing boundaries.
            Additionally they depend on which frame of the MovieClip is active at the
            time you take these values. Think of them as like taking your temperature or
            blood pressure which is best not to take while programming. :-)

            --
            Lon Hosford
            www.lonhosford.com
            Flash, Actionscript and Flash Media Server examples:
            http://flashexamples.hosfordusa.com
            May many happy bits flow your way!
            "Jeckyl" <jeckyl@hyde.com> wrote in message
            news:e89t15$m4l$1@forums.macromedia.com...
            >> Can someone explain why there is this difference between when the
            >> flash
            >> environment reports and what actionscript properties report when I have
            >> an
            >> outline around a symbol?
            >
            > Because script takes the outline/stoke into account and the design
            > environment doesn't.
            > --
            > Jeckyl
            >
            >