Following mouse pointer

okay :slight_smile: here goes…

well, i am working on my first real site :stuck_out_tongue:
and i´ve already made the layout, i think its gd
clear colours and so on…

BUT, i wanna add a little extra to the whole thing :slight_smile:

so i was thinking about having a movieclip following the mouse pointer,
and to make it perfect for the site, i thought about butterflies flapping their wings… just 2 butterflies :slight_smile:

but as i am very new to everything, i dont really know what kinda script i need to make it follow the pointer, also, i want it to be with easing, so it doesnt just follow in a straight line

if anyone can help me with the script. i´ll be very happy :slight_smile:

There :slight_smile:

thx a bunch :), but uhm… dumb question, but how do i make the clip staying a bit away from the pointer? so it doesnt move directly under the pointer, but stays like a centimeter away? something with the mouse x and y pos?

onClipEvent (enterFrame) {
	endX = _root._xmouse + 5;
	endY = _root._ymouse - 10;
	_x += (endX-_x)/speed;
	_y += (endY-_y)/speed;

thx again

but i found out myself i think :open_mouth:

i edited the reg point, so that the butterfly is 1 cm left from the registration point :slight_smile:

but that script works just as fine :wink:


i´ll post the site when its done :slight_smile: