我有html页面,其中我使用flash来显示从页面左侧到中间的色调。当flash停止我试图在flash上浮动html内容时,可以在flash完成其工作时显示html,请提出建议。
<div id="flashContent">
<div class="branding"><h1>Test</h1></div>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="100%" id="resizing3" align="middle" >
<param name="movie" value="resizing3.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="transparent" />
<param name="scale" value="noborder" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="resizing3.swf" width="100%" height="100%"><p>Test</p>
<param name="movie" value="resizing3.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="transparent" />
<param name="scale" value="noborder" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
答案 0 :(得分:0)
您可以在AS代码中调用Js函数,如下所示:
public function myFlashFunction():void {
ExternalInterface.call("myJavascriptFunction", "argument");
}
JS:
<script type="text/javascript">
function myJavascriptFunction(param) {
alert(param);
}
</script>
您可以在此处找到完整的示例:http://code.tutsplus.com/tutorials/quick-tip-how-to-communicate-between-flash-and-javascript--active-3370