0

我想将 swf 嵌入到 javascript 中,我知道有一种方法可以做到这一点,但我该怎么做呢?这是我的 javascript

<script type="text/javascript">
adroll_adv_id = "JD5ZGBNO4RBYVAMMMPX3J7";
adroll_pix_id = "CEJOJM5N5VAHBKCVMT2DML";
(function () {
var oldonload = window.onload;
window.onload = function(){
__adroll_loaded=true;
var scr = document.createElement("script");
var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");
scr.setAttribute('async', 'true');
scr.type = "text/javascript";
scr.src = host + "/j/roundtrip.js";
((document.getElementsByTagName('head') || [null])[0] ||
document.getElementsByTagName('script')[0].parentNode).appendChild(scr);
if(oldonload){oldonload()}};
}());
</script>

我实际上有一个 Flash 横幅,我想将此 javascript 调用到该横幅中

4

1 回答 1

0

如果你想从 flash 中调用javascript函数,那么你需要从你的 flash 代码中这样调用,

Externalinterface.call("function_name","arg");

您需要导入库flash.external.ExternalInterface

于 2013-10-22T08:27:16.493 回答