讓html去呼叫內嵌swf中的function
按”閱讀更多”看全文
H TML
----------
<div id="flashcontent" style="width:600px;height:408px"></div>
<script type="text/javascript">
function gof() {
var myFlashMovie = document.getElementById("myplayer");
myFlashMovie.gof();
}
var so = new SWFObject("myplayer.swf", "myplayer", "600", "400", "8");
so.addParam("allowFullScreen", "true");
so.addParam("allowScriptAccess", "always");
so.write("flashcontent");
</script>
<a href="#" onClick="gof(); return false">[FULL SCREEN]</a>
FLASH AS3
-----------
import flash.display.Stage;
function gof():void { my_txt.text="TEST!"; stage.displayState = "fullScreen"; }
ExternalInterface.addCallback("gof", gof);
偵測使用者關閉Window
window.onBeforeUnload
0 意見:
張貼留言