Rotating a MC

ok, i’d like to have a circle with pic contained within it. I’d like to rotate the circle but have the picture always remain right side up as the circle rotates (like a viewmaster, that will be the final navigation). I’m kinda lost on just how to achieve this effect. Any help would be greatly appreciated.

Thank you.

1 last thing . . . I’d like to do this via AS not Tweening.
Thanks again.

How did you put your movie clips ? Is the picture inside the circle ?

pom 0]

I began by drawing the white circle which will serve as the viewmaster reel. I converted this to a mc. Then in the symbol I added the small pics which will serve as each individual slide. I made these all buttons as I plan to add actions to them @ a later date. Thanks for responding . . .

Also 1 other question . I’ve heard flash math creativity is great. Is it only great if your a huge math guru? (assuming you have it or know of it)

Thanks again.

I can’t answer your rotation questions…

Flash Math Creativity is an awesome book, and it showcases the talent of some amazing people, however, unless you have a very good grasp of scripting, then it will probably be over your head. Unless you fully understand all the code they are giving you, then its no good, because if you dont’ understand, then all you are doing is copying and pasting the code, and that doesn’t help anyone…

OK, so if I understand it well, you have a movie clip, and inside it a circle AND some pictures that are buttons, right ? If so, turn the circle into a movie clip, and then add the code you want to it. Something with

 onClipEvent (enterFrame) {_rotation +=5 ;}

Or am I mistaken ?

pom 0]

I think I answered his question last night…

<embed src=“” height=200 width=250></embed>

its very ugly…press the yellow button…

Correct, Thanks Jubba.
I have a new senario however . . . (I’m always loaded with questions)


The best way I can think of it is if you looked @ a ferris wheel from the side. This is so simple (the concept) but so hard to explain. Basicall think of the ferris wheel example. The whole wheel is turning but each car moves independantly based on gravity. The cars are hanging in midair from the pin holding them on top.

If this is too strange an explanation please say so.
Thanks for all the help.

>> Jubba : Ugliest thing I’ve ever seen. Hands down.
>> webclickusa : OK, I get it. You have to give your wheel a _rotation, but your clips have to move round with this kind of actionscript :

 onClipEvent (load) {
  radius = 50 ;
  centerx = 100 ;
  centery = 100 ;
  speed = 3 ;
  angle = 0 ; //this parameter changes depending on which car you're dealing with
onClipEvent (enterFrame) {
  _x = centerx + radius*Math.cos(angle*Math.PI/180) ;
  _y = centery + radius*Math.sin(angle*Math.PI/180) ;
  angle += speed ;

Good luck.

pom 0]

Shush Pom! I threw that together in under 4 minutes!

Woah! Are you Maths guru? the calculation is very complex to me. Im wondering how did u guys manage to learn that??? especially playing wif the sin cos thingy.

Hey POM,

How about a line by line explanation of this (if you have time). Basically I guess we need a math lesson on exactly why this works? Thanks to you & Jubba for all your time.

Jubba >> :rollin: You know I love you…
Mystic >> far from it. Simple trigonometry.
WebClick >> OK…

 //I chose to define all the variables on load
onClipEvent (load) {
  radius = 50 ; //well... the radius
  centerx = 100 ; // x position of the center
  centery = 100 ; // y position of the center
  speed = 3 ; // rotation speed
  angle = 0 ; // starting angle
// Now some action
onClipEvent (enterFrame) {
  _x = centerx + radius*Math.cos(angle*Math.PI/180) ;
  _y = centery + radius*Math.sin(angle*Math.PI/180) ;
//these 2 lines are trigonometry. I'll try and make a little swf to explain.
//Basically, that's the code to give an object a circular motion
  angle += speed ; // we move the object

I hope it’s clearer now.

pom 0]

you better love me Pom…:slight_smile:

getting clearer. If you could come up with a little .swf i’d really appreciate it.

Anyway, I’ll copy your explanation here & then toss my questions out. Setting the variables, ok I’m with you on that no problem. lol

onClipEvent (enterFrame) {
You seem to be setting the x & y location here which will make the object appear in the same starting spot everytime. In other words you’re not dictating the placement of .this by positioning it on the stage. It’s set on enterFrame.

_x = centerx + radiusMath.cos(angleMath.PI/180) ;

_y = centery + radiusMath.sin(angleMath.PI/180) ;
ok the math is:
_x = centerx (which never changes from the time it’s set @ load) + radius (which also never changes) * COS (please explain cos, i stink @ math i guess) of (angle*Math.PI)/180 - Why do we divide by the 180? Changing that value doesn’t seem to affect the animation.

//these 2 lines are trigonometry. I’ll try and make a little swf to explain.
Please do, I’d love to see a .swf

//Basically, that’s the code to give an object a circular motion

angle += speed ; // we move the object
I understand the move

Sorry to dwell on this one. I appreciate it, really I do.
Thanks POM

I’m having a hard time doing that swf. But there it is anyway.

And by the way, the fact that I multiply by Math.PI/180 is because Math.cos takes as argument an angle in radians, not in degrees, so this will turn degrees in radians.

pom 0]

The movie (not so clear)…

pom 0]