PDA

View Full Version : [MX] Continous Rotation?



lune
September 9th, 2003, 08:42 PM
Well, here's my problem.

I'm relatively new to Actionscripting, although the more I use it, the more I love it.

HAHA! That wasn't the problem! (Well, I guess it IS the problem, really :sigh: ) but here goes, and I will love you forever if you can help me :)

I'm trying to figure out the AS for continous rotation (centered, in place). I can't imagine this being too difficult, but as all the tutorials I've managed to find on it include buttons, or are off center, I'm horribly lost. Specifically, I'm trying to make a tire look like it's rotating on a vehicle, and don't have the foggiest where to begin - I can probably figure out the continous loop portion, but I haven't a clue as to what the code is for actually making the _mc rotate.

Thanks for your time, and troubles :)

p.s.- I come here often, just never posted before, as I can usually find my question answered within the forums, and don't really know enough to help anyone else out. :love:

Yeldarb
September 9th, 2003, 09:23 PM
onClipEvent(enterFrame) {
this._rotation += 5;
//change five to change the speed of the rotation
}

lune
September 14th, 2003, 01:18 PM
Thanks so much, Yeldarb. Exactly what I was looking for!

(Also, for the other AS n00bs out here, if you put that code into a movie clip, then convert it into another movie clip, that code will always remain in that clip, no matter the timeline position.

Basic, sure, but I'm sure we've all had trouble somewhere along the way)