Skip to main content
Participant
July 3, 2006
Question

_width and _height differences

  • July 3, 2006
  • 2 replies
  • 122 views
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]
This topic has been closed for replies.

2 replies

Inspiring
July 3, 2006
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
>
>


Inspiring
July 3, 2006
> 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