On 3/20/06, David Stiller <[EMAIL PROTECTED]> wrote:
I suspect the answer to this one is purely geometry. It's trivial
to determine the width or height of a movie clip: there's the _width and
_height properties, of course, as well as getBounds(). But when the clip
is
rotated, the concept of "width" changes. I'm looking for a way to
determine
the width of an imaginary bounding box that contains the rotated clip.
This is going to depend slightly on what you're looking for. If your
movieClip is a circle, then rotating it will leave the bounding box
unchanged, whereas if it's a square, then rotating it will change these
values. But assuming your original clip is rectangular; or that you;re
looking for the dimensions of *its* bounding box when rotated, then at an
angle of A, the new width will be Math.abs(w*cos(A))+Math.abs(h*sin(A)), the
new height will be Math.abs(w*sin(A))+Math.abs(h*cos(A)). Remember that if A
is measured in degrees, you need to multiply it by pi/180 to convert to
radians.
HTH
Danny
_______________________________________________
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