hi,
i need help with a mouse follow. what i’m trying to do is make an animal follow my mouse but only within the banner of my site.
i used the mouse follow tutorial on this site to start and so far i have the animal following the mouse horizontally only which is what i want.
theres really 3 parts i need help with:
i need to constrain it to the width of the banner/stage. but i’m not sure how to do that. so far my code looks like so:
onClipEvent (load) {
_x = 0;
_y = 58.6;
speed = 5;
}
onClipEvent (enterFrame) {
endX = _root._xmouse;
_x += (endX-_x)/speed;
also i want to know if its possible for the animal to follow the mouse even if the mouse is not within the banner. so if my mouse was at the bottom of the site, the animal in the banner would still follow.
and one last thing i wonder if its possible to flip the image of the animal depending on the direction its moving. E.g the animal is facing to the right, its starts on the bottom left of the banner, so if i move my mouse to the right it looks fine because the animal if facing the correct way. but if i move the mouse to the left it looks as if the animal is running backwards. so my question is, is it possible to flip the image when the mouse moves left, then flip it again when the mouse moves right?
thanks alot for your help and sorry for asking for so much in my first post :sigh: