Flash의 버튼에서 jQuery로 작성된 함수를 호출하기 만하면됩니다.
jQuery의 $ (document) 밖에 함수를 배치하면 .ready 잘 작동합니다.
* btw Flash를 포함하기 위해 SWFObject를 사용합니다.Flash AS3 ExternalInterface에서 jQuery 문서의 함수를 호출 할 준비가되었습니다.
AS3 :
import flash.external.ExternalInterface;
function test_fnc(event:Event):void {
ExternalInterface.call("jsFunction", "hello world");
}
test_mc.addEventListener("click", test_fnc);
JS : 플래시 jsFunction
호출이 정의되지한다시
<script type="text/javascript">
function jsFunction(words) {
alert(words); // "hello world";
}
$(document).ready(function() {
// not from here
});
</script>
정말 당신이 무엇을 요구하는지 분명치 않습니다. 왜 $ (document) .ready 내에서 함수를 정의해야합니까? – spender
내가 jQuery를 사용하여 만든 배열에 액세스해야합니다. \t \t \t \t VAR alt_array = $ ("# 섬네일 IMG")를지도를 (함수() { \t \t \t \t \t 반환 $ (이) .attr ("고도 "); \t \t \t \t}); – FFish