How to get the active Paragraph?
I have following TLF XML:
private var text:XML =
<flow:TextFlow fontSize="20" paddingRight="50" paddingBottom="50" paddingTop="50" paddingLeft="50" whiteSpaceCollapse="preserve" xmlns:flow="http://ns.adobe.com/textLayout/2008">
<flow:p>
<flow:span>Hallo liebers Programmili... du tust schon langsam meinem koepchen weh</flow:span>
</flow:p>
</flow:TextFlow>;
I try to get the Paragraph for a selection inside the text using following Methodes:
var index:int = tf.interactionManager.anchorPosition; // i get 29 here
var child:FlowElement = tf.getChildAtIndex(index); // undefined - it should be the flowElement containing the text... <flow:span></flow:span>
var para:ParagraphElement = test.getParagraph();//undefined - it should be the paragraph
I really started to enjoy the new framework... but now i am getting really mad ![]()
Can anybody imagine what i am doing wrong? The undefined itself makes me suspicious... shouldn't it be null?
Help would be much appriciated!
