Flash Follow Mouse Tutorial
Posted: Fri Jan 08, 2010 9:18 pm
Hi All
Here is a Very simple Tutorial on HOW TO MAKE A MOVIE CLIP FOLLOW THE MOUSE
1. Create a new empty Flash Document
2. Add a Picture or anything to the Flash Library then drag it out onto the Flash Stage and convert it too a MOVIE CLIP (Select it and Press F8 ) then in the dialog box that pops up Choose Movie Clip and click OK.
3 Click on the Object on the Stage and Press F9 to open the Actionscript window for the Movie Clip and paste this code in.
The code above is really self explanatery
i have used the Codenstuff Gif for my Movie clip cooll;
Download the attachment and check it out, where ever you move your Mouse it will follow
Happy Mouse Following wahooo;
Chris
Here is a Very simple Tutorial on HOW TO MAKE A MOVIE CLIP FOLLOW THE MOUSE
1. Create a new empty Flash Document
2. Add a Picture or anything to the Flash Library then drag it out onto the Flash Stage and convert it too a MOVIE CLIP (Select it and Press F8 ) then in the dialog box that pops up Choose Movie Clip and click OK.
3 Click on the Object on the Stage and Press F9 to open the Actionscript window for the Movie Clip and paste this code in.
Code: Select all
Then Press CTRL+eNTER TO RUN itonClipEvent (load) {
_x = 0;
_y = 0;
speed = 8;
}
onClipEvent (enterFrame) {
endX = _root._xmouse;
endY = _root._ymouse;
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}
The code above is really self explanatery
i have used the Codenstuff Gif for my Movie clip cooll;
Download the attachment and check it out, where ever you move your Mouse it will follow
Happy Mouse Following wahooo;
Chris