flashcoders@chattyfig.figleaf.com
Sent: Wednesday, October 04, 2006 7:19 PM
Subject: Re: [Flashcoders] Find point after rotation
Lets say I have a rectangle (height width). I need to know the bottom
middle point. That would be point(clipWidth / 2, clipHeight).
So we'll say:
var x = clipWidth / 2
AM
Subject: Re: [Flashcoders] Find point after rotation
Hoping you can elaborate just a bit with this... I've created just a
simple test movie for this just using code in the timeline.
I have a movieclip 'myBox', which is 50X100, and located at 0,0 on the
stage. Then I put a circle movie clip
, 2006 7:19 PM
Subject: Re: [Flashcoders] Find point after rotation
Lets say I have a rectangle (height width). I need to know the bottom
middle point. That would be point(clipWidth / 2, clipHeight).
So we'll say:
var x = clipWidth / 2;
var y = clipHeight;
Closest I've gotten is using:
x
The _width and _height change based on the rotation so don't use the
stored _width and _height and instead use the current _width and
_height.
That is, unless you're trying to keep track of that exact point on the
rectangle after you rotate it, then that's something more complex.
, October 04, 2006 4:59 PM
Subject: RE: [Flashcoders] Find point after rotation
The _width and _height change based on the rotation so don't use the
stored _width and _height and instead use the current _width and
_height.
That is, unless you're trying to keep track of that exact point
Lets say I have a rectangle (height width). I need to know the bottom middle
point. That would be point(clipWidth / 2, clipHeight).
So we'll say:
var x = clipWidth / 2;
var y = clipHeight;
Closest I've gotten is using:
x=ClipWidth / 2 + Math.cos(angle)
y=ClipWidth / 2 - Math.sin(angle)
orry, I'm s rusty with math and hoping someone can push me in the
right
direction. Right now I'm trying to figure out the radius of the 'circle'
that is formed while rotating, but that isn't going anywhere (fast anway).
Just to kinda repeat what everybody has said --
You could easily
7 matches
Mail list logo