type = 'application/x-shockwave-flash'
data = 'http://sitepointstatic.com/flash/typewriter.swf'
width = '400'
height = '400'
bgcolor = 'black'

Download the sample files here.

1. Create one text field, and give it variable name "type".

2. Create 3 keyframes as shown below:


3. In the first key frame, insert the action:

text = "This text is being displayed with type writer effect"; 
max = length(text);  
loop = 1;

4. In the second key frame insert the action:

loop = loop + 1  

type = substring(text,1,loop);

5. In the third key frame insert the action:

if (i > max)  
{ stop(); }  
{ gotoAndPlay (2); }

6. That’s it! You have built your own type writer effect!

Georgina has more than fifteen years' experience writing and editing for web, print and voice. With a background in marketing and a passion for words, the time Georgina spent with companies like Sausage Software and sitepoint.com cemented her lasting interest in the media, persuasion, and communications culture.

No Reader comments

Special Offer
Free course!

Git into it! Bonus course Introduction to Git is yours when you take up a free 14 day SitePoint Premium trial.