AUSMA-AFFPG

Tutorial 2.

AFFPG 2 Tutorials: Trailed Boxes Menu ] [ Typewriter effect with dinamic text ]

Typewriter effect with dynamic text

View the results here:

Typewriter effect was redone with Flash CS4 program, tutorial was written by Audrone on 05.03.2010 for MX2004.

  1. Create a new Flash document, set its size to 250×250.

  2.  Put in this script in the First frame:

loadVariables("texteffect.txt","");
  1. Click on the Second frame, and Insert a Blank Key Frame. Insert this following code in the second frame:

step 2

if (loaded != "yes") {
gotoAndPlay(1);
}
  1. Right click on the Third frame, and Insert Blank Key Frame.
    With the Text tool, draw a rectangle, and set it properties to Dynamic Text, set its variable to texteffect.
    Then set the “Line Type” to Multiline. Choose font style which you want. If
step 4
  1. If you select the “render text as HTML” button, you’ll be able to incorporate a link in this typewriting effect by using HTML tag in the txt file. In the Third frame put this script:
stop();
var i = 0;
texteffect = "";
function textwritter() {
texteffect = txt.slice(0, i);
i++;
if (texteffect.length == txt.length) {
clearInterval(intervalID);
}
}
var intervalID = setInterval(textwritter, speed);
  1. Now we need to make the text file that will contain the text, and the variable that will determine the typing speed.

    Make a text file and name it: texteffect.txt, put the following lines in the text file, then save the text file in the same directory as the .swf file

    loadVariables (step 1) is the script that loads the information from the txt file.

I hope, it was easy. If you have problems with tutorials, apply to 

 

This group is about the theft of tutorials, bandwidth, web help and resources.
Tut Writers Inc Forum
Page 126    

Last Modified: 20-03-2010