/*
A good idea to set a config object to pass into the TextFlow object when you create it
*/
config = Configuration(TextFlow.defaultConfiguration).clone();
/*
And add this overflowPolicy to it as well as your formatting defaults
*/
config.overflowPolicy = OverflowPolicy.FIT_DESCENDERS;
textFlow = new TextFlow(config);
/*
Now imagine we are in a loop which adds a paragraph of lorem ipsum to the textflow and updates the controllers and checks if the flow is now out of the bounds of the container
*/
while(LOOP)
{
textFlow.addChild(myParagraphElement); // you've created the paragraph
textFlow.flowComposer.updateAllControllers(); // you've created the controllers
var containerIndex:int = textFlow.flowComposer.findControllerIndexAtPosition(textFlow.textLength-1);
if(containerIndex==-1) textFlowCompleteHandler();
}