Groups | Blog | Home
all groups > flash actionscript > august 2005 >

flash actionscript : Incorrect width and height


TroyK
8/2/2005 7:57:41 PM
Has anyone ever seen this problem and therefore know how I can solve it. I've
created several movieclips and then use actionscript to combine them all into
one clip. When I trace() the width or height of any of the clips it comes out
wrong. For example, if the width of the clip is 60 it comes out 62.9. What
the crock is that?

So now if I try to line up the clips side by side they always have a gap in
between them because they are smaller than what the _width is saying they are.

Please help!

Troy
Rothrock
8/2/2005 9:17:49 PM
Don't know what to tell you other than this. I've never had a problem with
_width or _height. Every time I've seen a posting here regarding this issue it
has either been that the poster didn't understand how _width and _height work
or that they had accidentally left some little smidgen of art, bitmap, line,
etc. off the stage or outside what they thought was the bounding box.\

If Flash is reporting the dimension as 62.9, then that is what the dimension
is.

Also you don't mention it, but masked clips measure the whole, unmasked
dimensions. I think...
Jeckyl
8/3/2005 12:00:00 AM
If you use lines with thickness, that can give you unexpected results.

NOTE: it is possible that your clip is inside another clip, and that other
clip is scaled. The size you see on the stage will be different to what the
script reports.

But _width and _height are always 'correct' .. it may just not be what you
are wanting/needing it to tell you.
--
Jeckyl

Chaval
8/16/2005 1:50:09 PM
I have the same problem and I'm sure I've not scaled any of the mc
containing this one. I have more tracks about where the problem is:
This mc has 2 layers: one with a photo and another one with a static
text in it. If I delete the text the size is shown correctly but not
when I show both. I tested it with 2 different fonts (Myriad and _sans)
and in both cases I obtain erroneous heights.
AddThis Social Bookmark Button