# Plz help

**URL:** <https://forum.kirupa.com/t/plz-help/117652>\
**Category:** Uncategorized\
**Created:** [July 29, 2004, 4:12am UTC](https://forum.kirupa.com/t/plz-help/117652 "2004-07-29T04:12:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bygones](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bygones](https://forum.kirupa.com/u/bygones)\
**Post date:** [July 29, 2004, 4:12am UTC](https://forum.kirupa.com/t/plz-help/117652/1 "2004-07-29T04:12:26Z")

</div>

I followed the tutorial Mouse Trail and ended up with the codes below, but de thing is the whole log of text moving instead of each letters follow the previous one.  
Plz show me the flaws.

[color=blue]Text = “Moving Text”;  
Letters = Text.split();  
LetterFormat = new TextFormat();  
LetterFormat.font = “Arial”;  
LetterFormat.size = “10”;  
LetterFormat.align = “center”;  
LetterFormat.color = “FFF666”;  
speed = 5;  
for (i=0; i\<Letters.length; i++) {  
\_root.createEmptyMovieClip(“Letter”+i, i);  
\_root[“Letter”+i].createTextField(“Field”+i, i, i_8, 10, (100_Letters.length), 20);  
with (\_root[“Letter”+i][“Field”+i]) {  
text = Letters\*;  
setTextFormat(LetterFormat);  
selectable = false;  
}  
if (i == 0) {  
\_root[“Letter”+i].onEnterFrame = function() {  
this.\_x += (\_root.\_xmouse-this.\_x)/speed;  
this.\_y += (\_root.\_ymouse-this.\_y)/speed;  
};  
} else {  
prev = i-1;  
\_root[“Letter”+i].onEnterFrame = function() {  
this.\_x += (\_root[“Letter”+\_root.prev].\_x-this.\_x)/speed;  
this.\_y += (\_root[“Letter”+\_root.prev].\_y-this.\_y)/speed;  
};  
}  
}  
[/color]

---

<div class="post-metadata">

**Author:** ![McGiver](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@McGiver](https://forum.kirupa.com/u/McGiver)\
**Post date:** [July 29, 2004, 2:09pm UTC](https://forum.kirupa.com/t/plz-help/117652/2 "2004-07-29T14:09:08Z")

</div>

1st: choose an appropriate title. “Plz help” is not appropriate. it will neither help those who are abled to help you, nor people who have a similar problem. 😉

2.i changed the lines in red.

```auto
Text = "Moving Text";
 [color=red]Letters = Text.split("");[/color]
 LetterFormat = new TextFormat();
 LetterFormat.font = "Arial";
 LetterFormat.size = "10";
 LetterFormat.align = "center";
 LetterFormat.color = "FFF666";
 speed = 5;
 for (i=0; i<Letters.length; i++) {
 _root.createEmptyMovieClip("Letter"+i, i);
 [color=red]_root["Letter"+i].createTextField("Field"+i, i, i*8, 10, 15, 20);[/color]
 with (_root["Letter"+i]["Field"+i]) {
 text = Letters*;
 setTextFormat(LetterFormat);
 selectable = false;
 }
 if (i == 0) {
 _root["Letter"+i].onEnterFrame = function() {
 this._x += (_root._xmouse-this._x)/speed;
 this._y += (_root._ymouse-this._y)/speed;
 };
 } else {
 [color=red]_root["Letter"+i].prev = i-1;[/color]
 _root["Letter"+i].onEnterFrame = function() {
 [color=red]this._x += (_root["Letter"+this.prev]._x-this._x)/speed;
 this._y += (_root["Letter"+this.prev]._y-this._y)/speed;[/color]
 };
 }
 }

```

---

<div class="post-metadata">

**Author:** ![bygones](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bygones](https://forum.kirupa.com/u/bygones)\
**Post date:** [July 30, 2004, 12:20pm UTC](https://forum.kirupa.com/t/plz-help/117652/3 "2004-07-30T12:20:57Z")

</div>

Thanks a lot!  
I’ll choose a relevant topic next time.  
By the way…I don’t understand why we have to create a variable inside a movie clip but a main stage??? Is there any critical difference???  
[color=#ff0000]\_root[“Letter”+i].prev = i-1;[/color]  
[color=#ff0000][/color]  
[color=#ff0000][/color]
