function getFlashMovie(movieName) {
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[movieName] : document[movieName];
}
function formSend() {
var text = document.htmlForm.sendField.value;
getFlashMovie("ExternalInterfaceExample").sendTextToFlash(text);
}
浏览器错误提示:sendTextToFlash is not a function;
请问sendTextToFlash应该写在html的哪个位置?
AS的代码:
import flash.external.ExternalInterface;
function getTextFromJavaScript(str:String):Void {
received_ti.text = "From JavaScript: " + str;
}
ExternalInterface.addCallback("sendTextToFlash", this, getTextFromJavaScript);