Skip to main content
Participant
February 27, 2009
Question

Any smart way of creating custom composer?

  • February 27, 2009
  • 2 replies
  • 468 views
I'm using TLF to create an app that support multiple general objects wrapped in TextFlow. The Objects could virtually be anything such as images or widgets, etc.
Currently now i'm trying to do this by puting multiple containers for each line sigment which is a chunk of a line(a line may have multiple segments in order to wrap the objets). and there's a wrapping algorithm calculating each line, segments and it's container's position.
My way of composing is like following:
1. first grab FLOW_OPERATION_BEGIN and do the corresponding operation using doOperation method on the operation object and call event.preventDefault. it stops further EditManager jobs and doOperation method change the model(TextFlow) and TextFlow dispatch DAMAGE event.
2. after that i catch the damage event and remove only the damaged the containers then create new containers line by line calculating the positions then updates.

It does the compose job for every editing events like text inserstion, pasting, style change .
As i proceed, it's more complicated and bloated. So i needed to optimize the composing phase.

Also i know that using TextLineFactory to create lines make the editing not work.
It left only a way of using the existing API. I feel the EditManager and Composer are much tightly so it seems like creating a customer composer is much more difficult for developers outside the Flex Team.

Any comments or advise will be appreciated.

Thanks Chuka
This topic has been closed for replies.

2 replies

sholoiAuthor
Participant
March 10, 2009
Thanks for you response, rdermer~
Can i ask about the release plan concerning about float objects and text wrappiing.

Chuka
Adobe Employee
March 10, 2009
Right now the public APIs are the ones necessary to use a flow composer but not the ones you'd need to write one.

Those APIs are still under active development.

Richard