Package | flashx.textLayout.conversion |
Interface | public interface ITextExporter |
Implementors | PlainTextExporter |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Public Methods
Method | Defined By | ||
---|---|---|---|
Export text content from a TextFlow instance in String or XML format. | ITextExporter |
Method Detail
export | () | method |
public function export(source:flashx.textLayout.elements:TextFlow, conversionType:String):Object
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Export text content from a TextFlow instance in String or XML format.
Set the conversionType
parameter to either of the following values:
flashx.textLayout.conversion.ConversionType.STRING_TYPE
;flashx.textLayout.conversion.ConversionType.XML_TYPE
.
Parameters
source:flashx.textLayout.elements:TextFlow — The TextFlow to export
| |
conversionType:String — Return a String (STRING_TYPE) or XML (XML_TYPE).
|
Object — Object The exported content
|
See also
Example ( How to use this example )
This code snippet shows a use of the export
method
to perform repeated exports of formatted text.
package flashx.textLayout.conversion.examples { import flashx.textLayout.conversion.ConversionType; import flashx.textLayout.conversion.ITextExporter; import flashx.textLayout.conversion.TextConverter; import flashx.textLayout.elements.TextFlow; public class ITextExporterExample { // Serialize the TextFlow into a String static public function export(textFlow:TextFlow):String { var exporter:ITextExporter = TextConverter.getExporter(TextConverter.TEXT_LAYOUT_FORMAT); return exporter.export(textFlow, ConversionType.STRING_TYPE) as String; } } }
Fri Mar 19 2010, 02:45 AM -07:00