Actually, your width will change with the rotation. The greatest width will be when the diagonal line of your rectangle is a flat, horizontal line. This width will be equal to the square root of the sum of the squares of the original height and width before the rotation.

Odie


On Mar 20, 2006, at 5:00 PM, David Stiller wrote:

Danny,

My MC is a 150x30 rectangle rotated to 45 degrees.
My results show width and height both at 180, when
they should be closer to 130.  Here's my code:

That's odd: when I go through those calculations
with a calculator, they come out with about 130,
just as you say [...].  Are you sure your mc._width
and mc._height are returning the correct values?

        Well, I checked, and am beginning to feel dumber and dumberer.
Somewhere, when I was dealing with this last night, my head must have been clouded up. If I take a 150x30 movie clip in the IDE and rotate it, the width and height, as indicated in the Properties inspector, updates the way
your calculation and the getBounds approach dictate they should.

        I was expecting mc._width to always return 150, even when it was
rotated. After all, the clip's width, from its own POV, hasn't changed. In fact, I would swear this is what was happening last night -- but, sheesh,
maybe not?  If I simply trace mc's _width and _height from the main
timeline, the values returned by those properties give me the data I want.
This happens with dot notation as well as onClipEvent(load) {trace()}.

        So ... I guess my whole question is moot.  But now I'm scratching my
head.


David
[EMAIL PROTECTED]

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to