Tag Archives: AddChild

Dynamically adding paragraphs to a Spark RichText control in Flex 4

The following example shows how you can dynamically add paragraphs to a TextFlow in a Spark RichText control by creating a new SpanElement (<span/>) and ParagraphElement (<p/>) object and then adding the spans and paragraphs to the textFlow object using the addChild() method.

Full code after the jump.

Continue reading Dynamically adding paragraphs to a Spark RichText control in Flex 4

Adding an FTETextField object to the display list in Flex 4

The following example shows how you can add an FTETextField object (formerly TLFTextField) by using a Halo/MX container and the rawChildren.addChild() method or by using a SpriteVisualElement object and the addChild() method.

The mx.core.TLFTextField class was renamed to mx.core.FTETextField in 4.0.0.10872.

Full code after the jump.

Continue reading Adding an FTETextField object to the display list in Flex 4