Jump to content


Animating XML text with splittextfield

Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Is it possible to populate a text field with text imported from an XML document then, animate that text with splittextfield? I have found very little information about doing this. Some say it can be done but no where have I found a demo, sample or tutorial showing how. It seems to me the ability to upload an XML text file and have GreenSock GSAP load that XML text and animate it in a browser would be huge. Seeing as how no one is talking about it makes me think it cannot be done but, I'd like to know definitively.

Link to comment
Share on other sites



SplitText is a Javascript utility.

SplitTextField is for ActionScript.


Not sure which one you are using as this is a javascript forum. Easy mistake to make. Please let us know which language you are using.


Regardless, in each language you can dynamically place text on screen, split it with our tools and animate it. Doesn't matter where the text comes from: XML, json, database... Whatever.


If you provide an example your XML loading I'm sure we can show you how to split it.

  • Like 1
Link to comment
Share on other sites

Hi Carl,

Ultimately I seek a way for others to type their text into an XML file and then have that text animate in an html page. So, I guess what I need is GSAP/Flash to make that happen. To do that, I would have to purchase and learn Greensock and loading XML and split text animation using my Flash CS5 on Mac.  Before doing that, I would like to know if it even possible to animate XML text. I  tried it years ago and could not get it to work. Perhaps with new versions, it is now possible.

Link to comment
Share on other sites

Yup, animating text loaded from xml with SplitText is absolutely, 100% possible.


Take XMLLoader for a spin and experiment with gettin your text to display. Take it one step at a time.

  • Like 1
Link to comment
Share on other sites

Thanks so much Carl for all your help and tutorials. You're an excellent teacher. However, XMLLoader tutorials seem to be all obsessed with loading images from an external folder. In the real world, we primarily use text to communicate... especially animated text for marketing or for information design. If I could load an image of a moose that can sell a product, I would but, animated text communicates better.

Walk into a marketing company and tell them you know how to load images from an XML file and they will say "Thanks, bye." But, tell them you know how to load text from an XML file and have that text animate on their web-ready screen at their point of purchase display... and, they will fall all over themselves to hire you. Yet, there are no tutorials showing in a complete process, how to fill a textfield with text from an external XML file and animate it with splittextfield.

Have you been out in the marketplace recently? Notice all the screen displays? They are hungry for information Carl. Greensock text animation is perfectly poised to satisfy that need and yet... tutorials are about loading pictures for gaming or site design or photo galleries or eye candy.  If you want people to use this magnificent Greensock platform, you're going to have to show them how. Just one tutorial showing how to load XML text and animate it, would empower thousands around the world. We don't need another tutorial showing how to load images of a moose... or two mooses... which would be meeses... or maybe just meese... sorta like mice... but, bigger.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.