Reputation: 105
I have a flash-based tutorial screen that pops up as an overlay to HTML. The overlay is being implemented through standard javascript. My question is how can I simply pass a variable from As3 so that Javascript can use it.
I basically have 3 screens within the tutorial, and on the final screen I want to pass a variable to the javascript so it can activate an additional set of commands. Any assistance would be most appreciated.
Thanks,
D
Upvotes: 0
Views: 446
Reputation: 13151
Define a function in JS (say myFunc). Call it from AS3 & pass the variable (say myVar) like this:
ExternalInterface.call("myFunc", myVar);
Upvotes: 1