无垢清净光,慧日破诸暗,能伏灾风火,普明照世间。
无言博客
一个菜鸟程序员,在复制粘贴的道路上越走越远!!!
cmp4监听模块播放完成时调度
无言博客 208 2020-3-19
<div id="player"></div>
<script>
	var cmpo;
	function cmp_loaded(key) {
		cmpo = CMP.get("cmp");
		if (cmpo) {
			cmpo.addEventListener("model_complete", "cmp_model_complete");  //监听模块播放完成时调度
		}
	}
	var flashvars = {
		lists : "",
		auto_open : 1,
		auto_play : 1,
		api : "cmp_loaded"
	};
	var htm = CMP.create("cmp", "100%", "100%", "cmp/cmp.swf", flashvars ); 
	document.getElementById("player").innerHTML = htm;

	function cmp_model_complete(){
		//播放完成后执行的动作
	}
</script>
END

发表评论: