Flash effects of typing

Source: Internet
Author: User

I want to make a flash effect for typing.
 
I want to make a typing effect, that is, words come out one by one, just like typing!

Answer: Darren
Level: Wise
April 23 Add a dynamic text box to the scene
Name output_txt

Create a new layer for the
Write at the first frame of this layerCode:
I = 0; // set the initial value of I. I is used to control the character position of the text.
TEXT = "abcdefghijklmnopqrstuvwxyz"; // write the words you want to enter here.
====================================
TEXT = "how is this done !! ";
Max = length (text );
I = "1 ";

Write code in the second frame:
If (I <= text. Length) {// If I <= abcdefghijklmnopqrstuvwxy, run
I ++; // I ++ indicates reading the next character
Output = text. substr (0, I); // substr () indicates that the read starts from 0
} Else {
Stop (); // if you have read this text, it ends.
}
========================================================== ======
I = Number (I) + 1;
Screen = substring (text, 1, I );

Write the code in the fourth frame (other frames can be used, and the latter the frame is, the slower the typing speed ).
Gotoandplay (2); // repeat the second frame of code to read all the characters.
========================================================== ======================

If (number (I)> Number (max) {
stop ();
}else {
gotoandplay (2 );
}< br>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.