Javascript to flash communication

后端 未结 6 945
清歌不尽
清歌不尽 2021-02-06 05:59

I am trying to call a Actionscript function from javascript but I am having problems in Internet Explorer. I am using Swiff.remote in mootools 1.2.1 to call the actionscript fun

6条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-06 06:43

    You can call it directly:

    playSwf.remote('sendResult', result, plays, name)
    

    Of course sendResult has to be registered with ExternalInterface.addCallback() in the AS code and the flash file has to fully loaded (otherwise all calls fail).

    An example can be found in this github repository (fancyupload): The as3proj contains the AS source, the JS remote calls are in Swiff.Uploader.js.

提交回复
热议问题