Skip to main content
Inspiring
February 17, 2009
Answered

Unable to access StandardFlowComposer

  • February 17, 2009
  • 2 replies
  • 647 views
I'm not able to import StandardFlowComposer in FlexBuilder. I see the SWC contains it but it mentions the "tlf_internal" namespace. Is this class limited by to that namespace visibility or public?

For now I'm casting flowComposer as FlowComposerBase but ideally I'd like to have access to StandardFlowComposer to extend it perhaps?
This topic has been closed for replies.
Correct answer rdermer
Works ok for me. I modified the HelloWorld example to recreate the flowComposer as below.

There are a couple of things to be careful about.
1) make sure you've set "Require Flash Player version" to 10.0. This step can require checking and unchecking the "Generate HTML wrapper file" option.
2) Reccomend turn off the "Remove unused imports when organizing" option.


import flashx.textLayout.compose.StandardFlowComposer;
import flashx.textLayout.container.DisplayObjectContainerController;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.TextFlow;
import flash.display.Sprite;

/** Simplest possible "Hello, World" text example */
public class HelloWorld extends Sprite
{
public function HelloWorld()
{
var textFlow:TextFlow = new TextFlow();
textFlow.flowComposer = new StandardFlowComposer();
var p:ParagraphElement = new ParagraphElement();
textFlow.addChild(p);

2 replies

Inspiring
February 17, 2009
Thanks for your reply. Very strange I still can't import that class here, I'll put it down to Eclipse as I'm already using FP10 (AIR 1.5) in both the .actionscriptProperties file (htmlWrapper) and in the other required places..
rdermerCorrect answer
Adobe Employee
February 17, 2009
Works ok for me. I modified the HelloWorld example to recreate the flowComposer as below.

There are a couple of things to be careful about.
1) make sure you've set "Require Flash Player version" to 10.0. This step can require checking and unchecking the "Generate HTML wrapper file" option.
2) Reccomend turn off the "Remove unused imports when organizing" option.


import flashx.textLayout.compose.StandardFlowComposer;
import flashx.textLayout.container.DisplayObjectContainerController;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.TextFlow;
import flash.display.Sprite;

/** Simplest possible "Hello, World" text example */
public class HelloWorld extends Sprite
{
public function HelloWorld()
{
var textFlow:TextFlow = new TextFlow();
textFlow.flowComposer = new StandardFlowComposer();
var p:ParagraphElement = new ParagraphElement();
textFlow.addChild(p);