87,955
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
import flash.external.ExternalInterface;
Button1.addEventListener("click",function(){
ExternalInterface.call("fun");//fun是js里定义的函数,按下button1触发该函数
});
<html>
<title>welcome</title>
<body>
<object width = "550" height = "400"><param name = movie value="flas.swf">
<embed src = "flas.swf" width = "550" height = "400" name = "2" align = "">
</embed>
</object>
<script language = "JavaScript">
function fun()
{
alert("hi , im flash!");
}
</script>
</body>
</html>