This seems like it should be so simple…
I am working on a modified version of the characters eyes follow the mouse trick.
on my actions layer I have the following code:
[COLOR=Blue]
startDrag(“drag”, true);[/COLOR]
[COLOR=Blue][COLOR=Black]the movie clip “moving_eyes” is what I want to move. it is inside another movie clip called “coyle” which contains the rest of my character art including the mask. [/COLOR][/COLOR]
I have the following actions on the “moving eyes” movie clip
[COLOR=Blue]*onClipEvent (enterFrame) {
_x += (_parent._xmouse-_x);
// set scroll
if (_root._xmouse>236) {
_root.coyle.moving_eyes._x -= 5;
} else if (_root._xmouse<0) {
_root.coyle.moving_eyes._x += 5;
}
//set bounds
if (_root.coyle.moving_eyes._x<=-236) {
_root.coyle.moving_eyes._x = -236;
} else if (_root.coyle.moving_eyes._x>=245) {
_root.coyle.moving_eyes._x = 245;
}
}*[COLOR=Black][/COLOR][/COLOR]
At this point the eyes follow the mouse but they do not stop at either of the boundaries that I tried to set. I ran a trace to get the numbers 236 and 245. When the mouse moves too far to the right or left the eyes vanish under the mask rather than staying equal to the coordinates I set.
My scripting has never been great but I’m also really rusty. Can anyone help?