Posted By

daisuke103 on 02/14/08


Tagged

javascript textmate java script external dialog interface call as2


Versions (?)

AS2 JS FlashからJavascriptを呼ぶ


 / Published in: Other
 

  1. // htmlヘッダ
  2. function showDialog(message){
  3. alert(message);
  4. }
  5.  
  6. // Flash側
  7. // ExternalInterfaceライブラリをインポート
  8. import flash.external.ExternalInterface;
  9.  
  10. // ボタンとかで
  11. callBtn.onPress = function():Void{
  12. var str:String = textBox.text;
  13. ExternalInterface.call("showDialog", str);
  14. }

Report this snippet  

You need to login to post a comment.