1

I have a flash swf file without access to it's source. Can I use only JavaScript to invoke/initiate the action of the flash functions within the swf file?

Or does the swf need active listeners to respond to JavaScript?

1 Answer 1

1

You cannot communicate with an SWF (at least an AVM2 (AS3 based) SWF) unless it has registered callback methods in it. The ExternalInterface class has an addCallback() method that:

Registers an ActionScript method as callable from the container. After a successful invocation of addCallBack(), the registered function in Flash Player can be called by JavaScript or ActiveX code in the container.

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

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.