# Simplist way to do the typewriter affect

**URL:** <https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144>\
**Category:** flash\
**Created:** [July 9, 2003, 9:02pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144 "2003-07-09T21:02:36Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbadmilkman](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bigbadmilkman](https://forum.kirupa.com/u/bigbadmilkman)\
**Post date:** [July 9, 2003, 9:02pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/1 "2003-07-09T21:02:36Z")

</div>

Hi I just wanted to know what would be the simplist way to do a trypwriter affect because I think that would really impress my boss, I want to impress her cos then I can ask her out on a date, please 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:** [July 9, 2003, 9:19pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/2 "2003-07-09T21:19:00Z")

</div>

Place a textfield onn stage. Give an instance name of **textfield\_txt**. Set it to dinamic, multiline. Now place these actionson 1st frame:[AS]myText = “your text goes here”;  
this.onEnterFrame = function() {  
textfield\_txt.text = myText.substr(0, type);  
type += 1;  
};  
[/AS]

---

<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:** [July 9, 2003, 9:24pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/3 "2003-07-09T21:24:50Z")

</div>

hey man, when u say you need to put a textfield on the screen what do u mean by that, and when u’ve put ’ put ur text here’ is that the text that i want the affect to be on?Sorry for the stupid questions I am a bit of a beginner at 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:** [July 9, 2003, 9:28pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/4 "2003-07-09T21:28:23Z")

</div>

Select the text tool. Make a texfield on stage with the text tool. On properties, set type to dynamic and line type to multiline. Now on your timeline, select 1st frame. Hit F9 to open Actions panel. Paste the code i provided. Replace “your text goes here” with the text you want to typewrite.  
Dats it.

---

<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:** [July 9, 2003, 9:28pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/5 "2003-07-09T21:28:51Z")

</div>

Hey man, not to worry, thanks for the advice, u must be a real pro at this stuff, respect to u!!

---

<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:** [July 9, 2003, 9:31pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/6 "2003-07-09T21:31:14Z")

</div>

> \*Originally posted by bigbadmilkman \*  
> \*\*Hey man, not to worry, thanks for the advice, u must be a real pro at this stuff, respect to u!! \*\*

😛 I wish!

---

<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:** [July 9, 2003, 9:32pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/7 "2003-07-09T21:32:26Z")

</div>

Hey man, say if I wanted a lot of text rather than just a couple of words, would I use the same method, or is there a better method?

---

<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:** [July 9, 2003, 9:36pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/8 "2003-07-09T21:36:04Z")

</div>

Do the same. Although u may want to speed up a little by increasing the fps of your movie or incresing the value of the variable type.

---

<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:** [July 9, 2003, 9:49pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/9 "2003-07-09T21:49:16Z")

</div>

Hey Claudio I really appreciate ur help, i have another minor problem, i typrwriter affect is working fine, but just before the typwriter affect happens, the block of text appears for a flash second and then the typewriter affect happens, do u know why this might be happening ?

---

<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:** [July 9, 2003, 9:53pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/10 "2003-07-09T21:53:11Z")

</div>

Ok, use this code:[AS]myText="";  
this.onEnterFrame = function() {  
textfield\_txt.text = myText.substr(0, type);  
type += 1;  
myText = “your text goes here”;  
};[/AS] Should do the trick :-\

---

<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:** [July 9, 2003, 10:03pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/11 "2003-07-09T22:03:23Z")

</div>

Oh man, that works a treat, hey another question, I am probably bugging the hell out of u, but when i put the text in, when the typriter affect happens, it after each line, it leaves 1 blank line, this takes up too much space, how do i delete these empty lines?

---

<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:** [July 9, 2003, 10:07pm UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/12 "2003-07-09T22:07:05Z")

</div>

don’t worry I have sorted it out!!Man I owe you one, thanks a lot man!!

---

<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:** [July 10, 2003, 4:44am UTC](https://forum.kirupa.com/t/simplist-way-to-do-the-typewriter-affect/25144/13 "2003-07-10T04:44:51Z")

</div>

You’re welcome 🙂
