# \[as\]Text effect

**URL:** <https://forum.kirupa.com/t/as-text-effect/59581>\
**Category:** flash\
**Created:** [August 2, 2004, 6:42am UTC](https://forum.kirupa.com/t/as-text-effect/59581 "2004-08-02T06:42:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![egoldy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/egoldy/32/385_2.png) [@egoldy](https://forum.kirupa.com/u/egoldy)\
**Post date:** [August 2, 2004, 6:42am UTC](https://forum.kirupa.com/t/as-text-effect/59581/1 "2004-08-02T06:42:21Z")

</div>

I found this text effect used in many site.  
like this yugop v4.

[http://yugop.com/](http://yugop.com/)

How to do that text effect?  
who can give a tutorial link?

thanks.

---

<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:** [August 2, 2004, 6:58am UTC](https://forum.kirupa.com/t/as-text-effect/59581/2 "2004-08-02T06:58:18Z")

</div>

You mean that [Letter Cycling](http://www.kirupa.com/developer/flash5/randomlettercycling2.htm) thing? 😉

---

<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:** [August 2, 2004, 8:08am UTC](https://forum.kirupa.com/t/as-text-effect/59581/3 "2004-08-02T08:08:29Z")

</div>

hi,wizard  
thanks.  
a little different from [yugop.com](http://yugop.com).

---

<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:** [August 2, 2004, 10:11am UTC](https://forum.kirupa.com/t/as-text-effect/59581/4 "2004-08-02T10:11:03Z")

</div>

Yeah the yugop letter cycler is amazing, I really want to know how I can do something like this!!

---

<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:** [August 2, 2004, 3:29pm UTC](https://forum.kirupa.com/t/as-text-effect/59581/5 "2004-08-02T15:29:51Z")

</div>

Wow! Does anybody know what’s happening in Yugop’s letter cycling? It looks like it starts from nothing but ‘\_\_\_\_\_\_\_\_\_\_\_’ and then it sort of eases to the right letter :huh:

---

<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:** [August 2, 2004, 4:09pm UTC](https://forum.kirupa.com/t/as-text-effect/59581/6 "2004-08-02T16:09:13Z")

</div>

> [@Ilyas le G(r)eek](#):
>
> Wow! Does anybody know what’s happening in Yugop’s letter cycling? It looks like it starts from nothing but ‘\_\_\_\_\_\_\_\_\_\_\_’ and then it sort of eases to the right letter :huh:

just done it quickly but it seems to work.  
movieclip with a dynamic textfield myText linkage identifier mc  
on the timeline  
myArray = [“a”, “b”, “c”, “d”, “e”, “f”, “g”, “h”, “i”, “j”, “k”, “l”, “m”, “n”, “o”, “p”, “q”, “r”, “s”, “t”, “u”, “v”, “w”, “x”, “y”, “z”];  
word = “hello”;  
for (i=0; i\<word.length; i++) {  
myClip = attachMovie(“mc”, “mc”+i, i);  
myClip.ivar = i;  
myClip.\_y = 200;  
myClip.\_x = 200+myClip.ivar\*myClip.\_width;  
myClip.targ = word.charAt(myClip.ivar);  
myClip.myText.text = myArray[random(myArray.length)];  
myClip.onEnterFrame = change;  
}  
function change() {  
if (this.myText.text != this.targ) {  
this.myText.text = myArray[random(myArray.length)];  
} else {  
this.myText.text = this.targ;  
delete this.onEnterFrame;  
}  
}

obviously can be improved upon but basically there

[http://www.gifsrus.com/testfile/textrandom.swf](http://www.gifsrus.com/testfile/textrandom.swf)

---

<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:** [August 2, 2004, 4:29pm UTC](https://forum.kirupa.com/t/as-text-effect/59581/7 "2004-08-02T16:29:00Z")

</div>

nice job, and it appears somebody else on kirupa daily reads k10k 😃

well… just wanted to point out that I knew where you found it really… 😛

anyways, I love the main animation that’s awesome and so is there text thing, but it seems stringy did a nice job if you bump the frame rate up

---

<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:** [August 3, 2004, 2:34am UTC](https://forum.kirupa.com/t/as-text-effect/59581/8 "2004-08-03T02:34:16Z")

</div>

> [@stringy](#):
>
> just done it quickly but it seems to work.  
> movieclip with a dynamic textfield myText linkage identifier mc  
> on the timeline  
> myArray = [“a”, “b”, “c”, “d”, “e”, “f”, “g”, “h”, “i”, “j”, “k”, “l”, “m”, “n”, “o”, “p”, “q”, “r”, “s”, “t”, “u”, “v”, “w”, “x”, “y”, “z”];  
> word = “hello”;  
> for (i=0; i\<word.length; i++) {  
> myClip = attachMovie(“mc”, “mc”+i, i);  
> myClip.ivar = i;  
> myClip.\_y = 200;  
> myClip.\_x = 200+myClip.ivar\*myClip.\_width;  
> myClip.targ = word.charAt(myClip.ivar);  
> myClip.myText.text = myArray[random(myArray.length)];  
> myClip.onEnterFrame = change;  
> }  
> function change() {  
> if (this.myText.text != this.targ) {  
> this.myText.text = myArray[random(myArray.length)];  
> } else {  
> this.myText.text = this.targ;  
> delete this.onEnterFrame;  
> }  
> }
> 
> obviously can be improved upon but basically there
> 
> [http://www.gifsrus.com/testfile/textrandom.swf](http://www.gifsrus.com/testfile/textrandom.swf)

Thanks for you nice work . but your work like kirupa random letter cycling tutorial. feel some different from [yugop.com](http://yugop.com).  
eg: how to make the text cycling when it is changing short.

---

<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:** [August 3, 2004, 1:28pm UTC](https://forum.kirupa.com/t/as-text-effect/59581/9 "2004-08-03T13:28:03Z")

</div>

> [@egoldy](#):
>
> Thanks for you nice work . but your work like kirupa random letter cycling tutorial. feel some different from [yugop.com](http://yugop.com).  
> eg: how to make the text cycling when it is changing short.

You can just give the mc`s a counter property  
eg/myClip.counter =random(10)  
then in the change function  
this.counter++  
if (this.myText.text != this.targ && this.counter\<15) {  
this.myText.text = myArray[random(myArray.length)];  
}  
so you can make as long or as short as you like.  
[http://www.gifsrus.com/testfile/textrandom.swf](http://www.gifsrus.com/testfile/textrandom.swf)

---

<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:** [August 5, 2004, 7:48am UTC](https://forum.kirupa.com/t/as-text-effect/59581/10 "2004-08-05T07:48:08Z")

</div>

ello…stringy …i just using ur given code but it’s seem not working…  
not display the whole text…

u can look at my attach fla…

thanks for ur help…

---

<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:** [August 5, 2004, 11:02am UTC](https://forum.kirupa.com/t/as-text-effect/59581/11 "2004-08-05T11:02:18Z")

</div>

you should make your dynamic textfield in mc symbol1 a little smaller… just the size of 1 character… (and put mc symbol1 on the stage…)

---

<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:** [August 5, 2004, 12:25pm UTC](https://forum.kirupa.com/t/as-text-effect/59581/12 "2004-08-05T12:25:20Z")

</div>

> [@pixeldude](#):
>
> ello…stringy …i just using ur given code but it’s seem not working…  
> not display the whole text…
> 
> u can look at my attach fla…
> 
> thanks for ur help…

Heres the file i have currently, its modified a little from the above.Maybe it will help you sort out your problems

---

<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:** [August 6, 2004, 12:55am UTC](https://forum.kirupa.com/t/as-text-effect/59581/13 "2004-08-06T00:55:12Z")

</div>

yes…it really help me out…anyway tq for the fla …

---

<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:** [August 6, 2004, 4:50am UTC](https://forum.kirupa.com/t/as-text-effect/59581/14 "2004-08-06T04:50:34Z")

</div>

> [@pixeldude](#):
>
> yes…it really help me out…anyway tq for the fla …

welcome

---

<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:** [August 6, 2004, 7:31am UTC](https://forum.kirupa.com/t/as-text-effect/59581/15 "2004-08-06T07:31:19Z")

</div>

one more question stringy how about i’m gonna attach my beep sound to ur code…let’s say when the text effect is completed the sound also stop beep…  
thanks in advanced

---

<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:** [August 6, 2004, 7:31am UTC](https://forum.kirupa.com/t/as-text-effect/59581/16 "2004-08-06T07:31:19Z")

</div>

one more question stringy how about i’m gonna attach my beep sound to ur code…let’s say when the text effect is completed the sound also stop beep…  
thanks in advanced

---

<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:** [August 6, 2004, 10:05am UTC](https://forum.kirupa.com/t/as-text-effect/59581/17 "2004-08-06T10:05:05Z")

</div>

Stringy, that’s pretty close. There’s a difference though: you’re using multiple clips containing 1 letter (just like the cycling letters tutorial), whereas Yugop only has 1 textfield that contains the whole text 🙂 It is a bit more complicated.

---

<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:** [August 6, 2004, 7:14pm UTC](https://forum.kirupa.com/t/as-text-effect/59581/18 "2004-08-06T19:14:38Z")

</div>

> [@pixeldude](#):
>
> one more question stringy how about i’m gonna attach my beep sound to ur code…let’s say when the text effect is completed the sound also stop beep…  
> thanks in advanced

sound with a linkage identifier mys  
At the beginning of the code- mySound = new Sound();  
mySound.attachSound(“mys”);

then/  
clip.onPress = function() {  
for (var k = 0; k\<bA.length; k++) {  
removeMovieClip(bA[k]);  
}  
connect(word[this.jvar], this);  
mysound.start();  
};  
}

and/  
function change() {  
this.counter++;  
if (this.myText.text != this.targ && this.counter\<15) {  
this.myText.text = myArray[random(myArray.length)];  
} else {  
this.myText.text = this.targ;  
delete this.onEnterFrame;  
mysound.stop();  
}  
}

---

<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:** [August 7, 2004, 11:06am UTC](https://forum.kirupa.com/t/as-text-effect/59581/19 "2004-08-07T11:06:56Z")

</div>

> [@Ilyas le G(r)eek](#):
>
> Stringy, that’s pretty close. There’s a difference though: you’re using multiple clips containing 1 letter (just like the cycling letters tutorial), whereas Yugop only has 1 textfield that contains the whole text 🙂 It is a bit more complicated.

I bet you are right. Heres my attempt with 1 textfield, its pretty similar really, i just created a mc for each letter.  
[http://www.gifsrus.com/testfile/textrand3.swf](http://www.gifsrus.com/testfile/textrand3.swf)  
//textfield variable name mystring  
myArray1 = [“1”, “0”, “?”, “`”, “,”, " “, “a”, “b”, “B”, “c”, “d”, “e”, “f”, “g”, “h”, “i”, “I”, “j”, “k”, “l”, “m”, “n”, “o”, “p”, “q”, “r”, “s”, “t”, “u”, “v”, “w”, “x”, “y”, “z”,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“,”-“];  
function init(k) {  
delete mystring;  
myVar = k;  
delete A1;  
A1 = ;  
for (g=0; g\<k.length; g++) {  
A1.push(”-");  
myString += A1[g];  
}  
delete A2;  
A2 = ;  
for (var i = 0; i\<mystring.length; i++) {  
removeMovieClip(\_root[“paper”+i])  
tex = createEmptyMovieClip(“paper”+i, i);  
tex.ivar = i;  
tex.letter = myVar.charAt(i);  
A2.push(tex.letter);  
tex.counter = random(10);  
tex.onEnterFrame = move;  
}  
}  
function getString() {  
mystring = “”;  
k = A2.toString();  
for (i=0; i\<k.length; i++) {  
if (k.charAt(i) != “,”) {  
b = k.charAt(i);  
mystring = mystring.concat(b);  
}  
}  
}  
function move() {  
trace(“hi”);  
this.counter++;  
this.letter = myArray1[random(myArray1.length)];  
A2[this.ivar] = this.letter;  
if (this.letter == myVar.charAt(this.ivar)) {  
this.letter = myVar.charAt(this.ivar);  
delete this.onEnterFrame;  
} else if (this.counter\>10) {  
delete this.onEnterFrame;  
this.letter = myVar.charAt(this.ivar);  
A2[this.ivar] = this.letter;  
}  
getString();  
}  
myButton.onPress = function() {  
init(“hello how are you”);  
};  
myButton2.onPress = function() {  
init(“how is the weather”);  
};  
myButton3.onPress = function() {  
init(“all cows eat grass”);  
};

---

<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:** [August 7, 2004, 12:48pm UTC](https://forum.kirupa.com/t/as-text-effect/59581/20 "2004-08-07T12:48:12Z")

</div>

that one works really well… might I suggest changing the dashes to underscores though?

[Next page](https://forum.kirupa.com/t/as-text-effect/59581.md?page=2)
