查看完整版本: FLASH与JS通信:当FLASH有消息时IE窗口高亮显示

爱你不要你 2008-9-28 13:29

FLASH与JS通信:当FLASH有消息时IE窗口高亮显示

作者:taoshaw   类型:闪吧BBS

  当FLASH有消息时,让IE窗口高亮显示。打开此窗口,然后切换到另一个窗口。。。稍等片刻...:[url]http://www.taoshaw.com/taoshaw/study/iechangit/IEtiaodong.html[/url]

在HTML中添加代码:[code]<script language="JavaScript">
function windowstiao(){
        window.focus();
}
</script>[/code]在FLASH添加调用函数。请留意加粗部分。[code]import flash.external.ExternalInterface;
function textadd():Void {
        my_text.text += "加一个先!";
        ExternalInterface.call("windowstiao");
}
my_id = setInterval(textadd, 3000);
function clearit():Void {
        clearInterval(my_id);
}
my_id2 = setInterval(clearit, 30000);[/code]源文件下载:[attach]1471580[/attach]
页: [1]
查看完整版本: FLASH与JS通信:当FLASH有消息时IE窗口高亮显示