Skip to main content
Participant
Jan 22, 2009 1:39 PM UTC
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
robin_briggsCorrect answer
Adobe Employee
Jan 22, 2009 4:20 PM UTC
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.

3 replies

Participant
Feb 11, 2009 5:16 PM UTC
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){}

}
Translate
robin_briggsCorrect answer
Adobe Employee
Jan 22, 2009 4:20 PM UTC
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.
Translate
Jan 25, 2009 6:14 AM UTC
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.
Translate