Intro to SplitTextField: The Ultimate Flash Letter by Letter Animation Tool

by carl schooff on December 14, 2010 · View Comments

in GreenSock Tweening Platform Tips

This movie requires Flash Player 9

It is with great pleasure that I reveal to you how easily you can create complex text effects using GreenSock’s SplitTextField class. No longer do you have to manually break apart textfields into individual symbols and manually tween them. SplitTextField does all the heavy lifting for you, behind the scenes. Simply style and position your text how you want in the Flash IDE and use SplitTextField in conjunction with any Greensock Tweening tool to create smoothe and wonderful effects.

Watch the Introduction to SplitTextField Video

SplitTextField will break apart any dynamic textfield into letters, words or lines. Once a textfield is split you can pass a SplitTextField instance’s textfields arrayinto a TweenMax allFrom() or allTo(). Below is some sample code:


var snorkl_stf:SplitTextField = new SplitTextField(snorkl_txt);
TweenMax.allFrom(snorkl_stf.textFields, 0.5, {rotationX:-90, alpha:0}, 0.05);

The above code will create a SplitTextField object called snorkl_stf that will contain all the individual characters/letters of the textfield snorkl_txt. The TweenMax code that follows uses thesnorkl_stf.textfields array as a reference to each individual character.

The following SplitTextField usages show textfields being split into words and liness.


var tag_stf:SplitTextField = new SplitTextField(tag_txt, "words");
TweenMax.allFrom(tag_stf.textFields, .5, {rotationX:120, y:"60", alpha:0, delay:.5}, 0.1);

var features_stf:SplitTextField = new SplitTextField(features_txt, "lines");
TweenMax.allFrom(features_stf.textFields, .8, {x:"200", alpha:0, delay:1.2, ease:Cubic.easeOut}, 0.1);

Important Info

Download Flash CS4 source for both files used in the video

This zip contains ONLY FLASH FLA files. They will only work if you are a Shockingly Green Club Greensock Member and have a copy of the SplitTextField class.

snorkl-splitTextField-sample-files-CS4

Thanks so much for watching!

-Carl

Post to Twitter Post to Facebook

  • http://www.snorkl.tv/2010/08/flash-letter-by-letter-animation-with-tweenmax-the-nbc-effect/ Flash Letter by Letter Animation with TweenMax: The NBC Effect

    [...] UPDATE Dec 19/2010: No more breaking apart textfields and making a zillion symbols! Just added a tutorial on doing letter by letter animation with GreenSock’s SplitTextField. [...]

  • Cor

    Thanks for the fine tutorial!!!

  • http://www.snorkl.tv/ carl schooff

    yo cor. thanks for watching. I am very excited about this tool. stay tuned

    for more. – carl

  • picklezoo

    Will this class work with Tweener?
    ps, thank you for the tutorial, very neato effect…

  • http://www.snorkl.tv/ carl schooff

    Hello PickleZoo

    Yes this class will work with any tweening engine, I'm partial to greensock;) splittextfield does no animation.

    Carl

  • Jodi

    This is AWESOME! I am already 'shockingly green' but am now even more stoked! Thank you so much :)

  • http://www.snorkl.tv/ carl schooff

    SplitTextField is really a LOT of fun. There are so many possibilities.
    Be sure to read the documentation here:
    http://www.greensock.com/as/do…

    the deactivate and destroy methods will come in handy if you are ever splitting apart tons of text and need to clean up.

    thanks so much for watching and commenting. I want to do videos on some of the other “premium” plugins as well.

    Carl

  • Mark

    Hi out there,

    using stf in PV3D causes a little problem when using rotationX Y Z. After the tween is done the text is not sharp but very blurry. Using rotation instead will work properly. Any ideas's? Naturaly the font is embedded.

  • http://www.snorkl.tv/ carl schooff

    Hi Mark,

    The culprit is actually flash and the way it handles it's 3D effects. Even

    in the IDE if you do a rotationX/YZ the text will get “jaggy”.

    Here is a fix:

    http://forums.greensock.com/vi…

    thanks for watching

    Carl

  • http://www.facebook.com/people/Manuel-Regalado/503456670 Manuel Regalado

    Does it only works on flash player 10?

  • http://www.snorkl.tv/ carl schooff

    Hello Manuel,

    The 3D rotations only work in Flash Player 10, but splitTextField should

    work in 9.

  • http://www.facebook.com/people/Manuel-Regalado/503456670 Manuel Regalado

    Thanks Carl, is that the only feature that doesn't work on FP9?

  • http://www.snorkl.tv/ carl schooff

    yes, I tested in flash player 9 and it all works except the 3d stuff as

    mentioned earler.

  • Vodkanblues

    Great tutorials! i got the understanding of AS/Tweenmax in one day. In this particular case, for some reason the “rotationX” would not work, removing the X solved it perfectly, apparently rotationX did not exist in the corresponding SplitTextField.as file.

  • http://www.snorkl.tv/ carl schooff

    Great to hear you are learning.

    Maybe this is the reason:
    With rotationX it only works in flash player 10. You need to be working in CS4 or CS5 tools to export to flash player 10.

    Thx for stopping by.

    C

  • Pascal Zirn

    Cool Tutorial! I like the way you explain something and in a funny way

  • http://www.snorkl.tv/ carl schooff

    Thx pascal! Glad you enjoyed it.

    Carl

  • zukunftsmusik

    thx for this great tut. exactly what i am looking for. soon will be a member

  • http://www.snorkl.tv/ carl schooff

    cool man, glad you liked it. thx for commenting.

  • Merrick Brewer

    Hazzar… now that I have the Shockingly Green membership, I’m about to dive into the possibilities of SplitTextField… lovely stuff. Thanks Carl for the tutorial, this is going to help me get started!!

  • Emilio Incerto

    This tutorial is great, but I can’t seem get an ‘effect out’ without using the timelineMax tool. 

    For example I open the .fla and add the following as the last line of actionscript – after 5 seconds the text comes back in from -200 instead of effecting out to -200.

    TweenMax.allFrom(snorkl_stf.textFields, 0.5, {x:-200, delay:5}, .05);

    I know I’m missing something but can’t figure it out.

  • Emilio Incerto

    Nevermind – the answer was in my question. I now wrote TweenMax.allTo instead of allFrom

  • http://www.snorkl.tv/ carl schooff

    Cool. Glad you got it working.

  • Kyle1222280

    Another great video!! Do you know if there a way to start with the last character and work backwards instead of the first character?

  • http://www.snorkl.tv/ carl schooff

    sure, you can reverse the textFields array.

    mySplitTextField.textfields.reverse();

  • Kyle1222280

    I am unable to insert this into a timelineMax. It tweens all the characters at once. Sorry if this is a noob question! import com.greensock.*;import com.greensock.easing.*;import com.greensock.text.SplitTextField;import com.greensock.plugins.*;TweenPlugin.activate([BlurFilterPlugin]);TweenPlugin.activate([AutoAlphaPlugin]);var copy1:SplitTextField = new SplitTextField(copy1_txt);var timeline:TimelineMax = new TimelineMax();timeline.appendMultiple( TweenMax.allTo(copy1.textFields, 2, {y:120, x:159, blurFilter:{blurX:20, blurY:20}}));

  • Kyle1222280

    nevermind :)

blog comments powered by Disqus

Previous post:

Next post: