Skip to main content
Participant
August 31, 2009
Answered

Passing text from one TLF Instance to another - Flash CS4 IDE

  • August 31, 2009
  • 1 reply
  • 2329 views

I am a newbbie.

I am switching from dynamic textfields to TLF to accomodate the Arabic market(Right to left).

In my app, I would drag to the stage a "speech bubble"(with a nested TLF component) from a graphics library.

Then I would type something on a Editor(TLF component) and click submit.

The text should appear in the "speech bubble" but I don't know how to do that.

I can get the content from the Editor through


                    var out:String = TextFilter.export(enteredText.textFlow, TextFilter.TEXT_LAYOUT_FORMAT, ConversionType.STRING_TYPE);

Thanks

This topic has been closed for replies.
Correct answer chicflash

Hi

i was sick on last day.  you need to typecast this object to string like this

var str:String = String(exportText);

further this str could be used to pass bubble.

Thanks

1 reply

Inspiring
September 1, 2009

Hi,

export returns an Object not a String.

see this

function export(source:TextFlow, conversionType:String):Object;

you need to do this step

first create an object of ITextExporter

var exporter:ITextExporter = TextFilter.getExporter(TextFilter.TEXT_LAYOUT_FORMAT);

var exportText:Object = exporter.export(textFlow, ConversionType.STRING_TYPE);

trace(exportText);

After this you can assign this text to bubble

Hope this will be very helpful to you.

Thanks

acMnMAuthor
Participant
September 1, 2009

Thanks for the reply Raja.

Could you could explain how to add the "var exportText:Object" to the TLF Instance in the Speech bubble?

This bubble can be edited multiple times from the Editor.

I am also saving the TextFlow from that bubble so the user can save and load the content again.

Appreciate your help.  I've checked everywhere but nothing makes sense to me...

chicflashCorrect answer
Inspiring
September 3, 2009

Hi

i was sick on last day.  you need to typecast this object to string like this

var str:String = String(exportText);

further this str could be used to pass bubble.

Thanks