Rotation around simulated registration point?

Hi, I want to have arm movement such as the forearm rotating about the arm where the elbow should be the problem is the registration point is at the shoulder for arm. I want the forearms registration to be constantly equal to a simulated registration point where the elbow should be as the arms registration point would be at the shoulder. I need to do it WITHOUT NESTING(a movieclip within another) is it possible.

i tried useing a constant distant between the two clips but it doesnt work. dont know I I have to use trigonometry or not

I’m actually trying to do this in Director,so nesting wouldnt work

I think in brief what I trying to accomplish is
onEnterFrame=function(){

arm._x=shoulder._x
arm._y=shoulder._y

------------------problem----------------------------------
arm._x=simulated_x(where elbow would be)
arm._y=simulated_y(where elbow would be)
}

Thanx, sorry for any spelling mistakes

You need something like

[AS]
UpperArmAngle = xxx * Math.PI / 180; // xxx in degrees
UpperArmLength = yyy;

ElbowX = Math.sin(UpperArmAngle) * UpperArmLength + shoulder._x;
ElbowY = -Math.cos(UpperArmAngle) * UpperArmLength + shoulder._y;
[/AS]

Hope that helps.

yup, check your basic trigonometry formulas (ie what are the coordinates of a point on a circle (cos(x),sin(x)) =)

hey I didnt get it to work what I what is the real registration point of the forearm reprsented by green to constantly be attached to the simulated registration point represented as red. If the arm rotates i want the forearms _x and _y to constantly be equal to the _x and _y of the ‘fake’ registration point. I provided a pic below

can’t you do a parent child relationship? make the forearm a child of the arm, and thus, whenever the arm moves, the forearm follows, and when the forearm moves, it moves independently of the arm. Follow? I have no script for you, just the logic. Hope this helps

Although Hans gave you the answer already, here’s an example. :stuck_out_tongue:

xactly what i was lookin for

No problem. :wink: