FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

rotation script for flash

 


sceptileex
Ive been trying to create a flash website. I wanted a picture that would be rotated. I would have one part under mask, and when i rollover a button, the image would rotate, and a different part of the image would rotate into the mask.

My code is like this:
For the main pic:
Code:
onClipEvent(load){
   rot=0;
}
onClipEvent(enterFrame){
   rotation=(rot-_rotation)*.2;
   _rotation+=rotation;
}


For the buttons:
Code:
on(rollOver){
   _root.menu_mc.rot=30;
}


The problem i have now is that the image rotates around the top right corner. The axis is in the top right corner, but i want it in the middle. Can anybody help?
_VMX_
In the top right corner? Isn't it in the top left corner? (that's the default I think)

Anyway, try to select the movieclip, open up the "info" panel in the right, and see the place where you can see 9 squares and you can select one of them as the reference. Try to select the square in the middle centre, and see if it works that way.

See you.
sceptileex
No, it dosent work. Thanks anyway. Anyone else got another method?
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.