admin管理员组

文章数量:1320600

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

本文标签: how to call actionscript function from javascriptStack Overflow