フレックス:のhtmlTextアンカーからActionScript関数を呼び出す方法
-
22-08-2019 - |
質問
TextAreaコンポーネントのhtmlTextプロパティで定義されたアンカーからアクションスクリプト関数を呼び出すためにどのような方法があります。
ありがとうございます。
解決 2
私は答えを得た<のhref = "http://blog.circlecube.com/2008/12/portfolio/asfunction-texteventlink-tutorial-for-as3-flash-html-link-to-call-actionscript-機能・チュートリアル/」のrel = "nofollowをnoreferrer">ここの..
他のヒント
このアンカータグのhrefからの場合は、イベントを送出し、そのようにそれらを扱うことができます:
<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" link="linkHandler(event)" />
ExternalInterfaceクラスには、JavaScriptとActionScript間の通信チャネルを提供します。このクラスを使用して、ページのJavaScriptからの呼び出しと同様に、ディスパッチメッセージやデータバックのために聞くことができます。
以下のリンクは、AS 3.0参照されています。ホープことができます!
のExternalInterface Docmentationする
<のhref = "http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000340.html" のrel = "nofollowをnoreferrer" >使用法説明する
所属していません StackOverflow