Here are the steps
- Make a movie clip of a circle. Give it the instance name "planet."
- Make a "Input" text box. Call it "i"
- Click on Frame 1 and type in the action script panel, i=0.
- Click on the planet and paste the following code into the action script
panel.
onClipEvent (enterFrame) {
i=_root.i;
i=(i+6)%360;
r=i/180*Math.pi();
setProperty(_root.planet, _x, 200.+100.*Math.cos(r))
setProperty(_root.planet, _y, 200.+100.*Math.sin(r))
_root.i=i;
} |
- Test your movie.
|