I’m about to rewrite my LiquidText class in AS3 but first I thought I’d apply some of the code optimizations to the AS2 version and add some API calls to adjust settings just in case someone wants to use it.
Here’s an example of it in action below [ download FLV | download LiquidText.as ]
Essentially, what LiquidText does is it takes the text that you give it and breaks it down into an array of the individual words. It then finds a place where it can put the first word within the area that you specify without hitting any of the shapes that it wraps around. Then it places the following words until it runs out of space on that line. Then it wraps to the next line and starts the process over again.





Not bad, not bad… But… isn’t Flash Player 10 supposed to support this? Selecting more than one char or one word at a time too.
@Phillip, I’ve not heard of FP10 supporting this. I’ve heard about the right-left text and stuff but that’s about it.
Do you know something I don’t? Actually, don’t answer that. You don’t have time to go into all the stuff you know that I don’t. :-)
Hi Dan,
Phillip is right and I got this confirmed from Mike Downey while he was in Oslo last week. They are doing a full rewrite of all text handling for the next version. I love this class though! Can the text “fall thrugh” and hourglass-like shape as well? That’d be a cool demo :)
I thought Flash Player 10 was just going to make it easier to do this kind of thing. As I understood it we’re exposing the very low level text rendering APIs in the player and then building the layout engine on top of that in AS3. So developers will be able to extend what we write as well as add their own renderers for different languages.
But I could be wrong.
=Ryan
rstewart@adobe.com
@Jensa, look at what you made me do!