user2325396
user2325396

Reputation: 105

Sending a simple variable from AS3 to Javascript

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

Answers (1)

loxxy
loxxy

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

Related Questions