Ive just been mucking around with flash lately and while i was muking around i decided to try to do the eyes follow the mouse thing you always see. But while i was trying i work out i wouldnt have a clue how to do it. Would someone please be able to help. I cant work out how to keep the pupels in the eyes. and face the direction of the mouse ??
onClipEvent(enterFrame){
angle = (Math.atan2(_root._ymouse-_y,_root._xmouse-_x)*180/Math.PI)+90;
_rotation = angle;
}
you can change around the +90 depending on where the pupils are placed. also, i use that code in each individual eye, makes it look more realistic.
Thanks very much for that. But i think their might be something missing or something because when i place it on the pupil mc or any mc for that i does nothing ?
I mean it doesnt do nothing it rotates the pupil mc but i also wanted it to move towards the mouse until it reaches the outscirts of the eyeball?
ThankS in AdvancE
[h]ooligan
Last edited by hooligan2001; 04-03-2003 at 09:15 PM.