:whistle: 'Allo folks,
Urm… can someone explain the logic of circular motion (them radians and degrees). I’ve found the code for it and modified it a bit to make it do what I want.
But I haven’t a clue as to how it works…:puzzle:
This is a slightly modified code taken from the Kirupa Tutorial.
xcenter = 0;
ycenter =0;
[font=Courier New][size=2][color=#000080]onClipEvent[/color][/size][/font][font=Courier New][size=2][color=black] ([/color][/size][/font][font=Courier New][size=2][color=#000080]enterFrame[/color][/size][/font][font=Courier New][size=2][color=black]) {[/color][/size][/font]
degree += 22.5;
[font=Courier New][size=2][color=black]radian = (degree/180)*[/color][/size][/font][font=Courier New][size=2][color=#000080]Math.PI[/color][/size][/font][font=Courier New][size=2][color=black];
[/color][/size][/font][font=Courier New][size=2][color=#000080]this._x[/color][/size][/font][font=Courier New][size=2][color=black] = xcenter+[/color][/size][/font][font=Courier New][size=2][color=#000080]Math.cos[/color][/size][/font][font=Courier New][size=2]color=black*100;
[/color][/size][/font][font=Courier New][size=2][color=#000080]this._y[/color][color=black] = ycenter-[/color][color=#000080]Math.sin[/color]color=black*100;
}
The above code will change the position of the movieClip at every 22.5 degrees (thereby making sixteen distinct stops) and will trace a circle of radius 100 px.
Can anyone explain the trigo. concept behind the math equations? (I tried, I tell you… I really tried). :crying:
Thank ye…
/gopaldass/
[/color][/size][/font]