Skip to content

Instantly share code, notes, and snippets.

@darkredz
Created July 15, 2012 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darkredz/3116264 to your computer and use it in GitHub Desktop.
Save darkredz/3116264 to your computer and use it in GitHub Desktop.
Calling Javascript function from Adobe AIR UIWebView
//from AS3, call JS function named alertUserName
var obj:Object = {username: "superadmin"};
nativeWeb.callJsFunc('alertUserName', obj);
//in Javascript
function alertUserName(obj){
obj = JSON.parse(obj);
alert(obj.username);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment