xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Flash ExternalInterface API All In One

Flash ExternalInterface API All In One

flash 过时了呀 💩

API docs

ActionScript® 3.0 Reference for the Adobe® Flash® Platform

https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html

Flash CS5 ActionScript 2.0 Language Reference

https://open-flash.github.io/mirrors/as2-language-reference/flash/external/ExternalInterface.html

demos

image

public class ExternalVideoControl {

    private var video:MediaDisplay;

    public function ExternalVideoControl(video:MediaDisplay) {
        //ExternalInterface.addCallback  - one callback for each method you want to expose, pointing to a method within this class;
        //add listeners on the video player and point them to methods in this class, for example onProgress
    }
    public function playVideo():void {
        //play the video on the mediaDisplay
    }
    private function onProgress(event:ProgressEvent):void {
        //ExternalInterface.call - report progress back to javascript
    }
}


ExternalInterface.call("alert", "Hello World!");

(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!

refs

https://stackoverflow.com/questions/818089/using-externalinterface-in-flash

adblock

https://gitlab.com/adblockinc/ext/adblock



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2023-02-08 12:11  xgqfrms  阅读(13)  评论(0编辑  收藏  举报