Created
July 15, 2012 10:59
-
-
Save darkredz/3116264 to your computer and use it in GitHub Desktop.
Calling Javascript function from Adobe AIR UIWebView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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