-
I seem to run into probems with choppineess when I change move a movie clip with action script.. here is an example..
i have two mc's, A is stationary and B rotates around A.
here's the action script:
if (i == 360) { i = 0; }
b._x = a._x + (120 * Math.cos(i));
b._y = a._y + (120 * Math.sin(i));
i = i + .05 ;
gotoAndPlay(_currentframe
-
Flash's math objects work in radians not degrees. Change your code to something like this:
Code:
trans = Math.PI / 180;
if (i >= 360)
i = 0;
b._x = a._x + 120 * Math.cos(i * trans);
b._y = a._y + 120 * Math.sin(i * trans);
i += .05 ;
Something like that should do the job.
Good luck.