Actionscript 3 ExternalInterface, Pass variable to javascript?

Probocop picture Probocop · Jan 18, 2010 · Viewed 7.5k times · Source

How would I go about passing a variable to a javascript function using ExternalInterface?

Answer

Patrick picture Patrick · Jan 18, 2010

See the doc for external interface call function here

Ex.:

import flash.external.ExternalInterface;
if (ExternalInterface.available){
    ExternalInterface.call("myJavascriptFunction", argument1, .., argumentN);
}