Skip to main content
Participating Frequently
Oct 2, 2009 9:25 AM UTC
Question

Set TextFlow scroll

Hi Guys,

no solution found about this problem... how set an auto scrollbar for TLF?

This code was working with the first version of TLF Component for Flash CS4:

---------------------------------------------------------------------------------------------------------------------------------------------------

private function setTextFromXML(oXML:XML):void {

     oTextFlow = TextFilter.importToFlow(oXML, TextFilter.TEXT_LAYOUT_FORMAT);

     oTextFlow.flowComposer.updateAllControllers();

}

public function setSize(oWidth:int, oHeight:int):void {

     oTextFlow.flowComposer.addController(new ContainerController(this, oWidth, oHeight));

     oTextFlow.flowComposer.getControllerAt(0).verticalScrollPolicy = ScrollPolicy.ON;

     oTextFlow.flowComposer.getControllerAt(0).setCompositionSize(oWidth, oHeight);

     oTextFlow.flowComposer.compose();

     oTextFlow.flowComposer.updateAllControllers();

}

---------------------------------------------------------------------------------------------------------------------------------------------------

Now I'm working with textLayout.SWC from Flex 3.

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Adobe Employee
Oct 2, 2009 5:05 PM UTC

I'd suggest you look at the Flex Gumbo controls that use TLF and have scrolling built in. The "RichText" component might be a good place to start.

- robin

Translate