3 Replies Latest reply on Mar 4, 2010 5:43 AM by radikalFish

    TextFlow importFromString click handler not called

    radikalFish

      Hello

       

      Here's an simplified example how i import a String to a RichEditableText:

       

      textStr = "<p>some text and now a <a click=\"onClickTextLink(event)\">hyperlink</a> with click handler...</p>";
      richText.textFlow = TextFlowUtil.importFromString(textStr, "preserve");

       

      the problem is that the onClickTextLink handler is never called. It shows up the hyperlink text in link style (blue, underline) and it shows the hand curser but the methode is never executed...

       

      If i declare the textFlow inline (with exactly the same markup/text) it works as expected:

      <s:RichEditableText id="richText" top="15" bottom="15" right="15" left="15" focusEnabled="false" editable="false">
           <s:textFlow>
                <s:TextFlow>
                     <s:p>some text and now a <s:a click="onClickTextLink(event)">hyperlink</s:a> with click handler...</s:p>
                </s:TextFlow>
            </s:textFlow>
      </s:RichEditableText>
      

       

      that's the handler function (for the sake of completeness):

      protected function onClickTextLink(ev:FlowElementMouseEvent):void {
            trace("in onClickTextLink...");
      }
      

       

       

      Don't know what i am missing here...

       

      so long