Recently professional CC Game Flash PPT, a flash to do dynamic typing effect tut
Want to do a flash typing results. The online method should not too complicated, or various omissions. An effective flash doing in here typing results.
First, I use the latest version of flash professional cc. But it should be and the other version of the interface is slightly different. But the method of roughly the same.
Step one, using dynamic flash text box.
Figure turn an ordinary text box into the arena. Then set the
1 position: the name of the variable (here is set to NewText)
2 position: the drop-down list select the second "dynamic text"
Position 3: choose a multi line text
Note: there is a flash is not humane place, is unable to read Chinese problem. If you want to use the Chinese words, please be sure to set the font for the Chinese font (such as Song Ti). Or a big problem, script recognition not to
They established a dynamic text.
Step two: to insert a keyframe fifth second position below we in the flash following the time bar
Method of insertion in the fifth second position right click, select Insert the key frames.
Step three: create a script layer, come in a variety of time control dynamic text box to display the text
Below tell you what we are going to write the script ideas (for reference):
1, In the first frame, we use a thing (variables) and save all the words the current screen text box.
2, Also on the first frame, counter with a global, to control each text box to display the words, set the initial value is 1; when that first displayed text box only shows that the first word.
3, Originally, go to step second, start the flash we will see the screen printing of the first word of full text, and then stopped at the side of the end, this is not the result we wanted.
We want every 0.5 seconds to print the next word, then insert a script in fifth seconds time axis. When program execution to fifth seconds of the 1 counters, and then jump to move second frames continue program execution
(Note: we cannot jump back to the first frame, because the first frame. We set up a lot of things if the initial jump back will be set again, such as the counter will be continuously re set to 1, the text will not continue to print down)
So there is a cycle in the non-stop to print the next word.
4, After all the words are finished in the screen. The consumption of resources cycle stop.
Step four: in the first frame script layer into the script, you can press the F9 window system, MAC system in place right click the first frame, and then click in the right-click menu action(Actions)
Then fill out the following code out of the script editor
var textlen = 1;// A counter is set up, make it the beginning 1, print the first character
var text = newtext.text;// Sets a variable text, used to preserve all text content dynamic text box on the stage of our.
Step five: add a blank frame in frame second text layers
Then write the following script
if(textlen<text.length && textlen!=0)// If one by one to print text length does not exceed the length of the original text, and print one by one word can not be 0
newtext.text = text.substr(0,textlen);// Display all text text text during from zeroth to count the preservation of the text
textlen = textlen+1;//Count plus one, such as the original is 1, plus 1 is 2, the next will be printed to second words.
textlen = 0;//If all the text is displayed after each step, print 0 characters
Step six: in the text layer, fifth frame to create a blank frame, and add the following script
This graph below, you can Ctr enter to test results make you
Posted by Melissa at December 22, 2013 - 5:07 AM