" /> Francis Cheng: June 2009 Archives

« August 2008 | Main | July 2009 »

June 12, 2009

Project Blueprint, code samples a click away

Yesterday I heard about the new Blueprint Eclipse plug-in from the announcement on the Flex Doc Team's blog. I was intrigued by the convenience it promises, so I installed it and gave it a spin. The idea of having code samples just a click or key-press away got me pretty excited, because for me at least, seeing actual code is a critical step for me in learning how to use a particular class or interface.

Installation was pretty straightforward. It's been a while since I've installed an Eclipse plug-in, so I followed the Blueprint installation instructions pretty carefully.

Once installed, I restarted Flash Builder 4 beta and opened a sample I've been working on for the Text Layout Framework Overview. I noticed the new blueprint icon in the toolbar, which I've circled in red below:

blueprint_toolbar.jpg

Next, I highlighted the class name StandardFlowComposer from the import statements, then clicked on the blueprint magnifying glass icon in the toolbar to see whether it would pull up anything. Not surprisingly, there were no results. Text Layout Framework is still pretty new, so I'm not surprised that it returned no results.

I then delved into the constructor code in my example to highlight the property named "flowComposer", hoping this fairly common Text Layout Framework property would result in a hit. I was pleasantly surprised to see that it did:


blueprint_flowComposer1.jpg

Though, oddly, the first three hits were all of the same example code. Scrolling down to the fourth sample code listing, I found something useful, an example that actually uses the flowComposer property. I really like how the text "flowComposer" is highlighted in yellow:

blueprint_flowComposer2.jpg

I also tried just typing in partial phrases, and that didn't work so well, but I don't anticipate using it in that way. It's more likely that I've already looked up an API in the reference docs or I've copied it in from somewhere else, so highlighting full class, property and method names fits my programming style pretty well.

All in all, I think this could be pretty useful, especially as they smooth some of the rough edges, and make the plug-in easier to configure. If you give Blueprint a try, please let the team know how your experience went. They have set up a Blueprint forum for discussing all things Blueprint. Enjoy!

June 10, 2009

Text Layout Framework Overview Redux

You may have heard of the new Text Layout Framework, an ActionScript 3.0 component library that is based on the flash.text.engine package available in Flash Player 10. It first appeared on Adobe Labs last November.

At that time, we posted an overview of the framework that described the library as it existed last fall. Well the engineers have been hard at work improving the framework and have made quite a few changes to it. In fact, there have been enough changes that a new overview would be in order. As it turns out, I've been working on updating the overview, and have a draft of it ready for review. As it is a draft, I'm giving it an expiration date a week out from now, and will replace it with a new draft at that point if there are enough comments and suggestions to warrant a new version.

The updated overview has been incorporated into Chapter 21 of the Programming ActionScript 3.0 book, which is the chapter titled "Working With Text" (I printed only that chapter, so it appears as Chapter 1 in the download file). The last section of the chapter covers the Text Layout Framework. You can use the bookmark labeled "The Text Layout Framework" to get to the section or go directly to page 51.

I have included all of the "Working with text" chapter in the PDF download file so that you can compare the news layout example first done with the TextField class, then with the flash.text.engine package, and finally with the Text Layout Framework.

If you're new to the Text Layout Framework and want to get started with it, first read the updated overview, then go to the Text Layout Framework page for instructions on how to get started with the library.

Once you start using the framework, you'll probably want to have access to the API documentation. The ASDoc output for the framework is available as part of the Flex Gumbo documentation. Just look for the flashx.textLayout.* packages in the Flex Gumbo API Documentation. We'd love to get your feedback on what you like and don't like about the documentation we've done so far, and what you'd most like to see in the future.

To get a sense of what is possible with the Text Layout Framework, check out the latest version of the New York Times Reader 2.0 application, which is built with Adobe AIR and the Text Layout Framework.

What I'm working on these days

I'm back. I won't bore you with my personal travails, but will instead skip right to what I've been working on lately. Most recently, I've been documenting the new Text Layout Framework, which provides an easy way to take advantage of the immense power of the flash.text.engine package available in Flash Player 10.

Going forward, I'll be splitting my time between the Text Layout Framework and the creation of an updated version of the ActionScript 3.0 Language Specification.

I intend to make my work for the rest of the year very public, so I'll be detailing much of what I work on in future blog postings. My hope is that an open process will be mutually beneficial for both you the reader, and me, the tech writer. As always, your comments, suggestions and questions are always welcome.

My goal is to have an updated version of the Language Specification done before the end of November and to provide as much useful documentation for the Text Layout Framework as I can muster. I'll also be spending what little free time I have on what is now a sort of personal project. You may have heard that Facebook has an ActionScript API that allows developers to create SWF content that interacts with the Facebook servers. I have contributed some documentation to that open source effort, and intend to continue with that as time permits.