TextLayoutImporter and creating elements from XML
i'm trying use functions available through textlayoutimporter class create elements xml.
for example, use xml:
var chase_xml:xml = new xml('<p>chase</p>');
in conjunction "createparagraphfromxml" method of textlayoutimporter class create paragraphelement can add existing textflow using "addchild" method of textflow class.
unfortunately, keep getting empty paragraph rather paragraph sending importer.
the code i've been tinkering with:
var _headertextflow = new textflow();
//using same config textflow created, since understand purpose of config be? also, unsuccessfully, tried setting null
var new_importer = new textlayoutimporter(_headertextflow.configuration);
var spellparagraph:paragraphelement = new_importer.createparagraphfromxml(spellxml);
trace('get text: '+spellparagraph.gettext()); //this traces 'get text: '
_headertextflow.addchild(spellparagraph);
is function non-functional? pretty useful able go directly xml marked textlayout framework flowelements. going try write class when dug source , found functions such "createparagraphfromxml." unfortunately, not see working in way can understand...
that class isn't tested use case. it's not public class - marked excludeclass , not part of docs. hazard guess i'd either namespace mismatch issue or sort of initialization issue.
richard
More discussions in Text Layout Framework
adobe
Comments
Post a Comment