Preparations:
Create a new flash file (ActionScript 2.0) and save it as test.fla in this case.
Step 1:
Create a Dynamic Text on the Stage and key in "txt" as the value for Var.
Step 2:
Convert the Dynamic Text into a Movie Clip Symbol and set its instance name to "mc0".
Step 3:
Create a layer on top of the object layer and name it as actions.
Step 4:
Right-click on the frame and select Actions to open up the Actions panel.
Step 5:
Insert these codes inside the Actions panel.
Change the string of "MY_STRING" to your own preferred sentence.
Change the kern value to space out the letters depending on the font size of your dynamic text.
MY_STRING="Welcome to 10Steps.SG"; kern = 10; total = MY_STRING.length; xstart = mc0._x mc0._visible = 0; var i = 0; counterAppear = false; function txtDuplication(){ counterAppear = false; if(i |
Step 6:
Right-click on mc0 on the Stage and select Actions to open up the Actions panel.
Step 7:
Insert these codes inside the Actions panel.
onClipEvent(load){ this._visible = 0; txt = chr(starting); steps = final-starting; if(steps==0){ this._visible = 1; } adding = steps > 0 ? +1 : -1; _parent.counterAppear = true; } onClipEvent(enterFrame){ if(steps == 0){ return; } if(_root.counterAppear==true){ _parent.txtDuplication(); } this._visible = 1; thisChar = ord(txt); txt = chr(thisChar + adding); steps = steps - adding; } |
You can find plenty of Bitmap Fonts over at Dafont. The one I used in this tutorial is "Visitor by Enigma".
Hope you enjoyed the session. Have fun!
NOTE : ALL CREDITS FOR THE ORIGINAL TUTORIAL MAKER :)
0 comments:
Post a Comment