Skip to main content
Participating Frequently
October 6, 2010
Question

Giving different ContainerControllers different text colors

  • October 6, 2010
  • 1 reply
  • 427 views

I'm struggling with setting custom formatting properties on different ContainerControllers assigned to a single TextFlow instance. I can assign different columnCount properties and those display as desired, but other properties such as color seem to be ignored. I have tried this syntax:

myContainerController.color = 0x00ff00;
myContainerController.columnCount = 2;

I have also tried:

var tlf:TextLayoutFormat = new TextLayoutFormat();
tlf.color = 0x00ff00;
tlf.columnCount = 2;
myContainerController.format = tlf;

In both cases, the columnCount is set correctly, but the color is ignored. Is it possible to affect the color of the displayed text? That would seem to be one of the primary advantages of TLF text?

Any help would be appreciated. Thanks!

This topic has been closed for replies.

1 reply

Adobe Employee
October 7, 2010

The ContainerController's properties have no effect on the properties of the spans and paragraphs.

The effect you want is possible but would require some work - after each updateComplete you'd have to modify the spans color over the range that is in each controller.

Richard