Mouse Cursor Particle Effect
| Category | : Flash | Views | : 26825 | ||
| Version | : 8 | Rating | : | ||
| Type | : Text | Source File | : mouse-cursor-particle-effect.zip | ||
| Result | : See the result | ||||
On the last frame of the Movie Clip's layers drag the Movie Clips to the end of the path and set their alpha to 0:

Now create a Motion Tween in all Movie Clip's layers:

On the last frame of this Movie Clip paste:
//remove Movie Clip
this.removeMovieClip();
Set the identifier for this Movie Clip to "MCTween" and go back to the main timeline.
Open the actions for the first frame and paste:
//to attach new Movie Clips
var count = 0;
//when the mouse is moved
_root.onMouseMove = function()
{
//attach our Movie Clip
_root.attachMovie("MCTween", "MCTween" + count, count);
//set the coordinates to be equal to the mouse
_root["MCTween" + count]._x = _xmouse;
_root["MCTween" + count]._y = _ymouse;
//random rotation between 0 and 360
_root["MCTween" + count]._rotation = Math.round(Math.random() * 360);
//increase "count" by 1
count++
}
We rotate the Movie Clip to make them look different because they are exactly the same Movie Clip, but the effect is great.
Code Explanation
_root.onMouseMove = function()
{
_root.attachMovie("MCTween", "MCTween" + count, count);
_root["MCTween" + count]._x = _xmouse;
_root["MCTween" + count]._y = _ymouse;
Create a new Movie Clip and set its position to be equal to the mouse.
_root["MCTween" + count]._rotation = Math.round(Math.random() * 360);
Rotation the Movie Clip to a random angle will make every Movie Clip seem unique even if they are the exactly same Movie Clip.
count++
}
Increase this variable to create new Movie Clips with different names and depths.