-
a formula for moving a moviel clip in a circuler motion??!!
Hi,
Does anybody know what the script would be for moving a movieclip in a cicular motion (looping).
Any help much appreciated
-
Hi, use this.
x = r*Math.cos(2*Math.PI*f*t)
y = r*Math.sin(2*Math.PI*f*t)
r = radius
t = time
f = revolutions per sec
example
onClipEvent(load) {
r = 50;
f = 0.01;
t = 0;
}
onClipEvent(enterFrame){
this._x = r*Math.cos(2*Math.PI*f*t);
this._y = r*Math.sin(2*Math.PI*f*t);
t++;
}
That should work let me know how you get on
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|