A code monkey randomly typing on a keyboard for an infinite amount of time will almost surely produce brilliance (almost).

Spoken @ 360|Flex 2011

Posted: April 14th, 2011 | Author: Huyen Tue Dao | Filed under: Development | Tags: , , , , , | No Comments »

On Tuesday, April 14th I gave my presentation “Seriously, You Can Do Cool Things: Getting Advanced with the Text Layout Framework” at 360|Flex 2011. I want to again thank everyone that came to the session and stuck around till the end. Double “thank you” to the folks who left some of the nicest feedback on Twitter. You guys totally made my day.

Just a reminder that you can give an in-depth review and rating of my (and others’) session at apps.360conferences.com.

I have uploaded the slides to SlideShare and am linking a PDF version at the bottom of this post.  All of the code for my examples as well as continuing work on TLF is on github.  I am going to be expanding examples, trying out new TLF experiments, and adding documentation in the future so please check back or put a watch on the repo if you are interested in more of my TLF madness.

360|Flex has definitely become one of the highlights of my year as a developer, and we have such a fantastic community. Wonderful seeing you guys again and meeting new people. Already can’t wait till next year. Incredible job done by John and Nicole Wilker. You guys totally rock. Please keep up the great work.

“Seriously, You Can Do Cool Things: Getting Advanced with the Text Layout Framework”, Slides (635KB)


Answering some questions: Developer Profile on RIA RockStars

Posted: February 18th, 2011 | Author: Huyen Tue Dao | Filed under: Development | Tags: , | No Comments »

Shameless self-promotion doth follow: I recently got together with Kathryn Rotondo, a developer at litl, for a small interview for the newly-launch RIA RockStars. I was really grateful and flattered by the opportunity and hope I was not too droll. :)

Developer Profile: Huyen Tue Dao


I be speaking @ 360|Flex 2011

Posted: February 13th, 2011 | Author: Huyen Tue Dao | Filed under: Development | Tags: , , , , , | No Comments »

Just writing to let everyone know belatedly that I will be speaking at 360|Flex 2011 in Denver, CO. My talk is entitled “Seriously, You Can Do Cool Things: Getting Advanced with the Text Layout Framework.” Once again I will be tackling things TLF. This time I will focus less on the background and mechanics of the TLF and more jumping into more advanced topics and how to do… yes, cool things. It is not hard to find ill-will and smack talk about the TLF on the tubes, and I share some (if not many) of those complaints and criticisms. However, if you put some sweat and time into, the TLF can provide you with a foundation for creating interesting features and components. My main goal is to share my experiences and strategies and ideas for making this happen.

So if you are going to 360|Flex 2011, please think about stopping by and having a look/listen.


As Per Your Request: TLF Pagination

Posted: October 4th, 2010 | Author: Huyen Tue Dao | Filed under: Development | Tags: , , , | 7 Comments »

Update [15 March 2011]: Changed link to github repo for this example to a new repo.

Update: The link to my pagination example was broken for a while but I have fixed all the links so the example should be accessible again. Apologies.

So a commenter named Roberto asked for an example of TLF pagination.  I actually had planned to create a pagination example for my 360|Flex presentation but ran out of time.  So I have implemented one and added it to the github repo for my presentation-related code a new github repo I am using for all of my TLF-related code and projects.

Screenshot of TLF pagination example.

You can view the example live here.

Pagination involves adding containers to a TextFlow rendering of a particular size as needed until all text renders.  Now, assuming that you want text lines to fully render and not clip, you will set ContainerController.verticalScrollPolicy to ScrollPolicy.OFF.  When scroll policy is set to ON or AUTO, the ContainerController basically assumes that scrolling will occur within its container and so text lines may be clipped at the bottom or top of the container.  If there is more text than can be rendered in that container and there are no proceeding containers linked to the TextFlow, all remaining text lines are assigned to that container.  Therefore, the end of the container content will be the end of the TextFlow.  When scroll policy is set to OFF, text lines render only where they are not clipped or hidden.

The logic for paginating a TextFlow rendering goes like this:

  1. Add a container and link to the TextFlow via a new ContainerController.
  2. Check if ContainerController.absoluteStart + ContainerController.textLength == TextFlow.textLength.
  3. If false, then go back to step 1 and repeat and if true, then you have rendered all pages.

If you want to keep scroll policy as ON or AUTO, then you will want check instead if ContainerController.getContentBounds().height > container.height and add an extra page if true.

I also made a late-night edition of pagination with editable text.  My basic idea in dealing with pagination was to listed for the UpdateCompleteEvent dispatched by the TextFlow and to check the containers and container controllers and make sure that there are no empty pages save for the first page.  I have not yet implemented any auto-scrolling on addition or removal of pages, although if anyone wants, I can give it a go.

I hope this helps someone out.


Spoken @ 360|Flex DC

Posted: September 24th, 2010 | Author: Huyen Tue Dao | Filed under: Development | Tags: , , , , , | 1 Comment »

I want to thank everyone who came to my talk, “Typography + Text Editing in the Text Layout Framework.”  Text formatting and layout is not the sexiest topic in the world so I was glad to see that people were interested.  I also was glad to get folks asking questions, looking like maybe they would be interested in using the TLF themselves.

I have uploaded my slides to both this site and slideshare.  In regards to the example code, I have a GitHub repo and also have attached a zip of the code to this post.

I will be updating the slides soon to add references and adding comments.  In the near future, I may write follow-up posts discussing in detail how I implemented some features I added to the example code, especially one or two that I did not go over during my session.

Would love to hear from folks who have questions or just want to knock heads on the TLF.

Thanks again everyone for coming.

Typography + Text editing in the Text Layout Framework (PDF, 299KB)

TTTLF Code (ZIP, 598KB)

[UPDATE: I changed the github repo so the URL is different. Also I have created a library for TLF-related components that I have done for examples and may do in the future.]