As the title says; how do I make a movieclip move in a circle, only using actionscript and a premade movieclip?
Since I'm not THAT old, I haven't learned about Sin and Cos, yet - I know I have to use both, though, to get it working.
I've thought about making two functions.
One function, that makes the movieclip move in a half circle ( A -> B -> C)
And another function, that makes it move from C -> D -> A.
So basically;
MC x & y == A
function1:
if MC position == A:
Move MC constant y & increase x
function2:
if MC position == C:
Move MC constant -y & increase -x
I hope I was understandable.
Any hints / help is highly appreciated.
-Ragerin
Since I'm not THAT old, I haven't learned about Sin and Cos, yet - I know I have to use both, though, to get it working.
I've thought about making two functions.
| Code: |
| B
A C D |
One function, that makes the movieclip move in a half circle ( A -> B -> C)
And another function, that makes it move from C -> D -> A.
So basically;
MC x & y == A
function1:
if MC position == A:
Move MC constant y & increase x
function2:
if MC position == C:
Move MC constant -y & increase -x
I hope I was understandable.
Any hints / help is highly appreciated.
-Ragerin
