Flash mouse trails
The following tutorial will teach you how to create a custom mouse trail in Flash, conveying a message of your choice! If you're going to use what you're about to gain from this tutorial in your Flash applications, please promise me one thing: You won't use this effect excessively! It can be so annoying when it's overused!
Open up Flash, create a new document, and insert the following code into the first frame:
Text = "Pixel Snobbery";
letters = Text.split("");
letterformat = new TextFormat();
letterformat.font = "Verdana";
letterformat.align = "center";
letterformat.size = "11";
spacing = 5;
speed = 2;
for (var LTR = 0; LTR mc = _root.createEmptyMovieClip(LTR+"l", LTR);
mc.createTextField(letters[LTR]+"t", LTR, LTR*spacing, 10, 20, 20);
with (mc[letters[LTR]+"t"]) {
text = letters[LTR];
setTextFormat(letterformat);
selectable = false;
}
if (LTR) {
mc.prevClip = _root[(LTR-1)+"l"];
mc.onEnterFrame = function() {
this._x += (this.prevClip._x-this._x+5)/speed;
this._y += (this.prevClip._y-this._y)/speed;
};
} else {
mc.onEnterFrame = function() {
this._x += (_root._xmouse-this._x+10)/speed;
this._y += (_root._ymouse-this._y)/speed;
};
}
}
That's it! Just a few lines of code and you're done! You can easily edit the spacing between the letters, or the speed of the mouse trail by editing the "speed" and "spacing" variables. change the first line of the code in between the quotation marks to have a new message!