Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
Custom Trailing Cursor in Flash MX
Author: Siddharth
Create a dummy MovieClip
- Create a small rectangle and convert it into a MovieClip.
- This MovieClip will act as the Listener for mouse movements.
- Left-click on the MovieClip and open up the Actions Pane. Write the following code:
onClipEvent(load)
{
id=1;
}
onClipEvent(enterFrame)
{
diffX=_root._xmouse-_root.mouseX;
diffY=_root._ymouse-_root.mouseY;
if (diffX!=0 || diffY!=0)
{
duplicateMovieClip("_root.trail", "trail"+id, id+10);
_root["trail"+id]._x+=random(20);
_root["trail"+id]._y+=random(20);
if (id>100)
{
id=1;
}
else
{
id++;
}
}
}
| » Level Intermediate |
|
|
Added: : 2006-04-08
Rating: 4.88 Votes: 8
Hits: 901
|
| » Author |
|
College student 19 years old, Interests - Computers, Sports
|
| » Download |
|
Download the files used in this tutorial.
|
|
Download (0 kb)
|
|
Get conversion and unzipping tools
for PC and Mac here!
|
| » Forums |
|
More help? Search our boards for quick answers!
|
|
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.
|
|
|