| Flash Media Server学习站>>www.FMScn.com |
switch (System.capabilities.playerType.toLowerCase ()) { case "standalone" : fscommand ("quit", true); break; case "external" : flash.external.ExternalInterface.call ("sendQuit"); break; case "plugin" : case "activex" : flash.external.ExternalInterface.call ("window.close()"); break; }
就是根据播放器的类型来分别处理。
需要注意的是:
1、当在网页中播放时,需要在服务器上查看网页或者添加到信任区域才能有效,否则会弹出安全警告。
2、当包含在其他程序中时,需要处理退出消息sendQuit.
admin#flashas.net (#为@) 联系QQ:
:40777822
浙ICP备06033001号