Flash里如何在FF与IE8下也能调用到HTML里的JS函数?
我要实现点击Flash里的一个按钮或者链接,然后调用页面的JS函数。
网上说ExternalInterface适用性广一点,所以我用以下方法:
import flash.external.ExternalInterface;//导入 ExternalInterface 类
然后调用ExternalInterface.call("JS函数名");
可是在Maxthon里成功了,在IE8和FF下无反应。备注:我AS版本是2.0
请教解决方案。
[解决办法]
关注一下!
[解决办法]
最近比较忙
[解决办法]
来接分,CSDN里面开发flash的很少
[解决办法]
function createNewsList(total, array){ var movieclip = newsList.news.newMc; var i = 0; var mc; var titleVar; var delay; while (i < total){ var depth = movieclip._parent.getNextHighestDepth(); movieclip.duplicateMovieClip("new"+i,depth); mc = eval("newsList.news.new" + i); mc._x = -360; mc.id = i; titleVar = "<b>" + array[0][i].date + " - " + array[0][i].title + "</b>"; mc.titleTxt.htmlText = titleVar; mc.descTxt.htmlText = array[0][i].shortdesc+array[0][i].link; delay = 100 * i; setTimeout(setClipPos,delay,i,mc); if (array[0][i].link != undefined){ mc.link = array[0][i].link; mc.bg.onPress = function (){ _root.showPop("产品介绍",mc.link); //getURL(mc.link, "_blank"); }; mc.bg.onRollOver = function (){ this.up = true; this.play(); }; mc.bg.onRollOut = mc.bg.onReleaseOutside = function (){ this.up = false; this.play(); }; } // end if ++i; } // end while arrangeArticles(movieclip, total);}