RE: [Flashcoders] Determining width of rotatedMC'simaginaryboundingbox

2006-03-21 Thread David Stiller
 Odie Bracy PhD wrote:
 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.

That seems to sum it up, for sure.  Thanks, Odie.

 Yotam Laufer wrote:
 First of all you're welcome. When using
 the mathematical approace, are you feeding
 the Math.sin (a) method radian or degrees?
 It should be radians could that be your
 problem?

I'm using radians.  I thought about that, too, and checked for
the possibility first thing.  The more I experiment, actually, the more
I see the light.  Thanks for all the input!


David
[EMAIL PROTECTED]

___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] Determining width of rotatedMC'simaginaryboundingbox

2006-03-20 Thread David Stiller
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]

___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] Determining width of rotatedMC'simaginaryboundingbox

2006-03-20 Thread Odie Bracy PhD
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]

___
Flashcoders@chattyfig.figleaf.com
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


___
Flashcoders@chattyfig.figleaf.com
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