Now its much easier to communicate with Flash from Javascript and vice versa using ExternalInterface class.
You can create any function in Flash & then use the ExternalInterface class to register that function to call from the browser.
I am giving a step by step explanation to achieve the desired functionality.
First and foremost import the package using the statement given below -
import flash.external.*;
& then call the following function to register the function
ExternalInterface.addCallback("callASFunction", null, asFunction);
Explanation: The first parameter "callASFunction" is the name which will be used to call the function from the browser and the third parameter is the actual name of the function created in Flash. You can always keep the second parameter as null.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment