FLEX:How to catch 'a href' event

前端 未结 3 695
南旧
南旧 2021-01-25 09:56

I\'m loading data from TextFlow to spark:TextArea. In TextFlow i have \'a href\' elements. Problem lies with the address of the \'link\' elements. Some of them will go outside o

3条回答
  •  不知归路
    2021-01-25 09:56

    Maybe this helps. I use a html-link like this:

     Click me 
    

    The html-file is stored externally. I import the html to a TextFlow using importToFlow and add the Listener in Flex, like this:

    myTextFlow.addEventListener(FlowElementMouseEvent.ROLL_OVER, showMe);
    

    To get the id-property of the link I use:

    event.flowElement.id
    

提交回复
热议问题