3

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

2 Answers 2

5

In AS3 Use ExternalInterface to add a javascript callback.

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

More details here

Sign up to request clarification or add additional context in comments.

2 Comments

this seems very practical, i should try
1120: Access of undefined property uploadFile. i am getting this error, sorry i am very new in actionscript
1

Use ExternalInterface

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.