Newbie needs help with mouse trailer

Hello all,

This newbie needs your help. I am studying the “mouse trail” tutorial in Flash MX section. I am getting the beginning part of the code but the latter is still a little over my head right now. When I use it the way it is written. The letters follows the mouse cursor everywhere. Which is great. But I like to use it only in the “over” state of a button. So the letters “click me” will only appear and trail the cursor within the hit area of the button. Then disappear once the mouse cursor moves out of the hit area of the button. I got the “click me” trailing the mouse cursor to work when rolled over the button with this code

myButton.onRollOver = function() {
clickme();
};

//clickme() is the function I made with all the original code except the first line.

Now my problem is I don’t/can’t stop it from staying on when the cursor rolled out of the hit area. The original code is listed below. Your help is appreciated and I am really sorry for the long post.


Text = “Kirupa has the best site on the net!!!”;
letters = Text.split("");
letterformat = new TextFormat();
letterformat.font = “Verdana”;
letterformat.align = “center”;
letterformat.size = “10”;
spacing = 8;
speed = 3;
for (var LTR = 0; LTR<letters.length; 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;
};
}
}