Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS2 to Rotate a Wheel? 1

Status
Not open for further replies.

bsquared18

Technical User
Jun 10, 2001
329
US
Hi,

I'm in the process of learning ActionScript 2 and am a newbie to scripting in general. I created a graphic of a wagon wheel and converted it to a movieclip named wheel_mc. Then, I applied the following script:

onClipEvent (enterFrame) {
_root.wheel_mc._rotation = _root.wheel_mc._rotation + 1;
}

This causes the movieclip to rotate around the cross hair in the upper left-hand corner of the movieclip. Is there a way to move the cross hair to the center of the movie clip or to change the scripting so that the wheel rotates around its center point?

I know I could use non-scripting methods to make the wheel rotate, but since I'm trying to learn scripting, well, you know....

Thanks,

Bill
 
you can move the registration point with the free transform tool (press Q), or go into the movie clip, and just shift everything over slightly.
 
Thanks, your second suggestion did the trick.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top