最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

how to call actionscript function from javascript - Stack Overflow

programmeradmin1浏览0评论

I have a function like this in actionscript3

private function uploadFile(event:MouseEvent):void {
            var uploader:URLRequest = new URLRequest(serverUploadFile);
            localFile.upload(uploader);
        }

how can i call this function from javascript ?

thx

I have a function like this in actionscript3

private function uploadFile(event:MouseEvent):void {
            var uploader:URLRequest = new URLRequest(serverUploadFile);
            localFile.upload(uploader);
        }

how can i call this function from javascript ?

thx

Share Improve this question asked Nov 4, 2009 at 15:09 Utku DalmazUtku Dalmaz 10.2k30 gold badges92 silver badges133 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

In AS3 Use ExternalInterface to add a javascript callback.

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

More details here

Use ExternalInterface

发布评论

评论列表(0)

  1. 暂无评论