Skip to main content
Known Participant
May 13, 2011
Question

Single column and multiple columns in the same ContainerController

  • May 13, 2011
  • 1 reply
  • 1247 views

I know this isn't supported in any current version of TLF but nonetheless this is what our customers want.

Our customers want the ability to have a single page of text with two paragraphs of text set to two columns, the next paragraph only one column then the last paragraphs on the page be two columns again.

What do you think the best apporach to allowing for this functionality? I know the Times Reader did something similar to this.

After digging into the only approaches I can see are

     1. Extend ParcelList and totally pimp it out.

     2. Allow for multiple ComposeStates for a ContainerController

     3. Instead of having one ContainerController per page, during composition dynamically size ContainerControllers and have multiple per page. We would rather not do this due to it further hurting performance.

I know this is definitely something TLF doesn't support and maybe never will but since you guys are the ones that wrote the thing geting your opion on this would be awesome.

Thanks,

Joel Marks

This topic has been closed for replies.

1 reply

Adobe Employee
May 16, 2011
3. Instead of having one ContainerController per page, during composition dynamically size ContainerControllers and have multiple per page. We would rather not do this due to it further hurting performance.

If you have multi containers and let textflow flow within those containers, there is a TLF 3.0 new feature "ContainerBreakBefore & ContainerBreakAfter", which can help you to easily implement your layout as the picture shows. But 3.0 has not yet been picked up by Flex SDK.

For 1 & 2, and TimeReader issue, I need to confirm the answer with others.

Adobe Employee
May 16, 2011

Sounds like an interesting project!

I think Jin is right and the container break makes a useful building block to build on. If you don't know in advance what text you are filling in, you may find you also need to do something when you encounter one of these paragraphs to create the new geometry. If that's the case, you should be able to create new parcels, but you will have to do this from inside the ComposeState. You could extend the column properties to work on divs, and when you start a new div, you would set up the parcel list appropriately, and then do the corresponding parcel list rebuild when the div is completed, so that the remainder of the text can be composed. This is perhaps what you were alluding to with option #1. It will be a little complicated to code up, but the design should accomodate it. If you can get by with just the container breaks, and building up the container geometries in advance, that will be easier.

Keep in mind that if the text is not selectable or editable you can use the TextFlowTextLine factory and parent all the lines in a single DisplayObject. Conversely, if the lines are selectable... you'll have to work out how to treat the TextFlowLine's column property for the div. That could be tricky.

I'm not sure what you meant by option 2. If you were to describe it in some more detail, we could comment back on it.

- robin