Skip to main content
Participant
January 22, 2009
Answered

Any way to specify in the text flow that the story should be continued in the next column or container?

  • January 22, 2009
  • 2 replies
  • 892 views
Control characters to continue textFlow in next container or column?

Hi,
is there any way to specify in the text flow that the story should be continued in the next column or container; maybe a control characted (like in InDesign) or any other way?

Cheers
David
This topic has been closed for replies.
Correct answer robin_briggs
Unfortunately we do not have a "nextContainer" control character. It is on our list of requested features. I'm not sure there is a good workaround, but if the text is not being edited you could figure out the last line you want to include and then resize the container so the other lines don't fit and will push to the next container. If the text is going to get updated frequently, this approach might not work very well.

2 replies

Participant
February 11, 2009
I have a work around for determining the 'next' container. In this example I determine the number of lines in a container and continue to monitor any overflow using the compositionCompletionEvent. If the number of lines exceeds the container, that container is flagged with a red border. Presumably a new textFlow container could be added programmatically.

private function handleCompositionCompletionEvent(compositionCompletionEvent:CompositionCompletionEvent):void
{
trace("number of lines: " + textFlow.flowComposer.numLines);
trace("height of this container: " + this.height);

var numLines:int = textFlow.flowComposer.numLines;

try
{
var fontSize:Number = Number(IEditManager(textFlow.interactionManager).getCommonCharacterFormat().fontSize);
var lineHeight:String = String(IEditManager(textFlow.interactionManager).getCommonCharacterFormat().lineHeight);
var lineSpace:Number = Number(lineHeight.replace("%","")) / 100;
var overFlow:int = (fontSize * lineSpace) * numLines;

// give user notice that of text overflow if the container is NOT linked
if(this.isLinked == false)
{
if(overFlow > this.height)
{
canvas.setStyle("borderStyle","solid");
canvas.setStyle("borderColor","#CC0101");
canvas.setStyle("borderThickness",2);
}
else
{
canvas.setStyle("borderStyle","none");
}
}
else // this is a linked container
{
// alert user if the text added exceeds the available container space
var heightUsed:Number = textFlow.flowComposer.getControllerAt(objectHandlesIndex).calculateHeight();

if(heightUsed > canvas.height)
{
canvas.setStyle("borderStyle","solid");
canvas.setStyle("borderColor","#CC0101");
canvas.setStyle("borderThickness",2);
}
else
{
canvas.setStyle("borderStyle","none");
}
}


}
catch(e:Error){}

}
robin_briggsCorrect answer
Adobe Employee
January 22, 2009
Unfortunately we do not have a "nextContainer" control character. It is on our list of requested features. I'm not sure there is a good workaround, but if the text is not being edited you could figure out the last line you want to include and then resize the container so the other lines don't fit and will push to the next container. If the text is going to get updated frequently, this approach might not work very well.
January 25, 2009
Would you give an example of how to figure out the last line to include? I am able to find the flowLeafElement that contains the last line that I want to show, but I can't find how to get its y position or the compostiionHeight of the container to that point.