This is a start at an LzTextSprite implementation using the flashx.textLayout classes (aka Text Layout Framework, or 'TLF').
We can look over this when I'm out there on Wednesday. There's a test case in test/tlf/tlftext2.lzx which switches from editable to non-editable, and selectable to non-selectable, while still supporting basic mouse events. The basic architecture they have is that there is a TextFlow object, which can basically lay out HTML pretty much like the older TextField object, but has finer formatting control. That is the "Model" and "View", and then there are controllers for basic layout, editing, and selection. There were a couple of alternatives for controllers, but I chose to use one that is supplied called "TextContainerManager", which supports some TextField-like things. The alternative was to use their ContainerController class, which is a little more general purpose, but doesn't implement some useful things. The things we need to have, in addition to formatting support are control over Focus Selection Editing Scrolling Mouse events single/multiline text justification bidirectional text cursor control I have a first cut at most of those, except I haven't quite figured out how the focus works. Due to the architecture of the Flash text layout library, a lot of features are accessed by overriding methods in our own custom subclasses of the controller classes, rather than through Flash event handlers. -- Henry Minsky Software Architect [email protected]
tlf10.tgz
Description: GNU Zip compressed data
