-
Eyes Follow the Mouse?
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 ??
Please help :)
-
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
-
Does anyone even come in the Maths Physics Forum ...
-
1 Attachment(s)
-
thanks mr spock for posting that but when i try to open it it says's unexpected file format which is really weird cause im opening it in mx :D
-
No need to repost i worked it out Thanks Agian to all of you :)