플래시로 전달 된 객체 내에서 JS 함수를 호출하려고합니다.AS3에서 전달 된 객체에서 JS 함수 호출
JS 번호 :
<script>
function initContext() {
flashMovie.setContext(ctx);
}
var ctx = new Object();
ctx.saySomething = function(msg) {
alert(msg);
}
</script>
AS3 코드 :
if (ExternalInterface.available) {
ExternalInterface.addCallback("setContext", say);
ExternalInterface.call("initContext");
}
그래서 제 AS3는 JS initContext 및 JS initContext가 다음 객체를 호출 setContext 부른다. 지금까지이 작품. 나는 전달 된 개체에서 기능 saySomething를 호출하는 방법에 붙어 :
private function say(context:Object) {
ExternalInterface.call(???);
}