# Mouse trail tutorial

**URL:** <https://forum.kirupa.com/t/mouse-trail-tutorial/42636>\
**Category:** Uncategorized\
**Created:** [February 11, 2004, 11:21am UTC](https://forum.kirupa.com/t/mouse-trail-tutorial/42636 "2004-02-11T11:21:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CtrlZ](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@CtrlZ](https://forum.kirupa.com/u/CtrlZ)\
**Post date:** [February 11, 2004, 11:21am UTC](https://forum.kirupa.com/t/mouse-trail-tutorial/42636/1 "2004-02-11T11:21:44Z")

</div>

I have been using the following tutorial on this site and wonder if anyone can let me know how I would remove the effect when the user clicks a button to move to another part of the site?

[http://www.kirupa.com/developer/mx/mousetrailer.htm](http://www.kirupa.com/developer/mx/mousetrailer.htm)

thanks to all in advance!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 11, 2004, 11:55am UTC](https://forum.kirupa.com/t/mouse-trail-tutorial/42636/2 "2004-02-11T11:55:09Z")

</div>

You could use removeMovieClip();, or maybe making it:  
[AS]  
on (press) {  
Text = “”  
}  
[/AS]

that should work i think

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 11, 2004, 12:04pm UTC](https://forum.kirupa.com/t/mouse-trail-tutorial/42636/3 "2004-02-11T12:04:07Z")

</div>

the section of code for creating the Movieclip is as follows:

for (var LTR = 0; LTR\<letters.length; LTR++) {  
mc = \_root.createEmptyMovieClip(LTR+“l”, LTR);

I have been tying to use removeMovieClip(); but am unsure what should go in the brackets since all the movie clips are created using a loop.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 11, 2004, 2:40pm UTC](https://forum.kirupa.com/t/mouse-trail-tutorial/42636/4 "2004-02-11T14:40:49Z")

</div>

They were created in a for loop using \_root.createEmptyMovieClip(letters[L], L), so to remove them you use the same for loop with removeMovieClip:

```auto

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

```

That’s all. I’ve attached an example FLA for you.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 11, 2004, 3:16pm UTC](https://forum.kirupa.com/t/mouse-trail-tutorial/42636/5 "2004-02-11T15:16:26Z")

</div>

You’re a star!!

Thank you
