AS代码 import flash.external.ExternalInterface;ExternalInterface.call("Ok");function beginSnap(){ ExternalInterface.call("Ok");}ExternalInterface.addCallback("beginSnap",beginSnap); HTML代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title></title><script> var dt=new Object(); var start=false; //类块开始 BEGAIN function bigHead(Id){ if (navigator.appName.indexOf("Microsoft") > -1){ this.swfObj=window[Id]; }else{ this.swfObj=document[Id]; } } bigHead.prototype.beginSnap=function(){if(start==true){this.swfObj.beginSnap()}}</script></head><body οnlοad="dt=new bigHead('bigHead');"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" name="bighead" width="640" height="240" id="bigHead"> <param name="movie" value="a.swf" /> <param name="quality" value="high" /> <param name="allowScriptAccess" value="sameDomain" /> <param name="bgcolor" value="#666666" /> <embed src="a.swf" bgcolor="#666666" width="640" height="240" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowScriptAccess="sameDomain" name="bigHead"></embed></object><br><input type="button" value="执行" onClick="dt.beginSnap();"><script>function Ok(){ alert("ok")}</script></body></html>