开发者

how to call actionscript function from javascript

开发者 https://www.devze.com 2022-12-10 17:29 出处:网络
I have a function like this in actionscript3 private function uploadFile(event:MouseEvent):void { 开发者_JAVA技巧var uploader:URLRequest = new URLRequest(serverUploadFile);

I have a function like this in actionscript3

private function uploadFile(event:MouseEvent):void {
       开发者_JAVA技巧     var uploader:URLRequest = new URLRequest(serverUploadFile);
            localFile.upload(uploader);
        }

how can i call this function from javascript ?

thx


In AS3 Use ExternalInterface to add a javascript callback.

ExternalInterface.addCallback("uploadFile", null, uploadFile);

More details here


Use ExternalInterface

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号