MouseTrail Question

http://www.kirupa.com/developer/mx/mousetrailer.htm
in this tutorial there is an explanation how you can
make a “realy nice mouse trail”…

how do i turn if off? i want it only on one frame…(-:

Thanks in advance
Stas

on the frame u want to “turn it off” u can put this code on to remove it.

for (L=0; L<letters.length; L++) {
removeMovieClip(_root[letters[L]])
}

:eye: it does not work…

one more question…

can i change the color of the trail TXT ? how do i do it ?

it should work it just depends where u put it and if u changed anything to the original code…if so u’ll have to change the code a posted accordingly.
i just tested it out using the code from the original tutorial.

[AS]//–Type in all the letters–
stop()
Text = “kirupa”;
letters = Text.split("");
//–The text appearance–
letterformat = new TextFormat();
letterformat.font = “Verdana”;
letterformat.align = “center”;
letterformat.size = “10”;
//–Custom values–
spacing = 12;
speed = 3;
//–Creating the text–
for (L=0; L<letters.length; L++) {
_root.createEmptyMovieClip(letters[L], L);
_root[letters[L]].createTextField(letters[L]+“t”, L, L*spacing, 10, 20, 20);
with (_root[letters[L]][letters[L]+“t”]) {
text = letters[L];
setTextFormat(letterformat);
selectable = false;
}
//–Making it move–
if (L>0) {
_root[letters[L]].id = L;
_root[letters[L]].onEnterFrame = function() {
this._x += (_root[letters[this.id-1]]._x-this.lastX)/speed;
this._y += (_root[letters[this.id-1]]._y-this.lastY)/speed;
this.lastX = this._x;
this.lastY = this._y;
};
} else {
_root[letters[L]].onEnterFrame = function() {
this._x += (_root._xmouse-this.lastX+10)/speed;
this._y += (_root._ymouse-this.lastY)/speed;
this.lastX = this._x;
this.lastY = this._y;
};
}
}
_root.onMouseDown=function(){
for (L=0; L<letters.length; L++) {
removeMovieClip(_root[letters[L]])
}
}[/AS]

i just added the code for an example to the on mouse down function.so when you press the mouse button it will remove the text!

as for the colour.

add this.

ActionScript Code:
[FONT=Courier New][LEFT]letterformat.[COLOR=#0000ff]color[/COLOR]=[COLOR=#ff0000]“0xEC0000”[/COLOR]
[/LEFT]
[/FONT]

to below the other letterformat’s ( this will give u a red text).

THANKS :slight_smile:
You have been a Great help.

Stas