Here the code;
HTML
-------------
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="./ext.js"></script>
<script src="./lib/CSInterface-4.0.0.js"></script>
<link rel="stylesheet" type="text/css" href="./style.css">
</head>
<body onLoad="onLoaded()">
<button id="popAlert" onClick="onClickButton('AEFT')">Pop An Alert</button>
</body>
</html>
javascript
-------------
function onClickButton(ppid) {
var extScript = "$._ext_"+ppid+".popAlert()";
evalScript(extScript, function(a){alert(a);});
}
jsx
------
$._ext_AEFT = {
popAlert : function()
{
alert("hi im in After Effects!");
return "hi. im in javascript callback!";
}
};
"Returning strings to the callback function works for me." on After Effects?? I'm using AFX CC 2014, version 13.0.0.214.