Flex: How to call an actionscript function from htmlText anchor
问题 Is there any way to call an action script function from an anchor which defined in TextArea component's htmlText property. Thank you 回答1: If this anchor is an href from an tag, you can dispatch events and handle them like that: <mx:Script> <![CDATA[ private function linkHandler(e:TextEvent):void { if (e.text == "test") trace("test called") } ]]> </mx:Script> <mx:creationComplete> <![CDATA[ textArea.htmlText="<a href='event:test'>Link!</a>"; ]]> </mx:creationComplete> <mx:TextArea id="textArea