Skip to main content
Participant
Jun 25, 2009 1:13 PM UTC
Answered

Append "markup" text to existing textFlow

Hello,

what is the best way to append text with inline graphic to the end of existing textFlow component ? Imagine chat flash client - server sends a new string of XML markup text and client needs to append it to the bottom of "chat history" textFlow.

i read that one of the possible methods is to export to XML then append new markup text and then import to textFlow - but isnt it too slow, considering that textFlow will have alot of data ?

Thank you in advance!

This topic is closed to new replies. Start a new post to keep the conversation going.
Abhi.G.Correct answer
Participating Frequently
Jun 25, 2009 1:46 PM UTC

You are better off importing the new markup and appending the children of the imported TextFlow to the existing TextFlow.

Abhishek

(Adobe Systems Inc.)

2 replies

Jun 28, 2009 12:53 PM UTC

Hello Spoh,

The TLF have a serious problems with performance, but you can try:

var copiedTextFlow: TextFlow = TextFilter.importToFlow("MARKUP SENT BY SERVER", TextFilter.TEXT_LAYOUT_FORMAT);

while (copiedTextFlow.numChildren)
{
     TextFlow.addChild(copiedTextFlow.getChildAtIndex(0));

}

TextFlow.flowComposer.updateAllControllers();

I hope that helps.

Regards,

Marcos

Translate
Abhi.G.Correct answer
Participating Frequently
Jun 25, 2009 1:46 PM UTC

You are better off importing the new markup and appending the children of the imported TextFlow to the existing TextFlow.

Abhishek

(Adobe Systems Inc.)

Translate