Detect if Flash application loaded correctly using Javascript?

后端 未结 4 1636
栀梦
栀梦 2020-12-16 03:48

My product opens a web browser and points it at an HTML file containing a local Flash application. How do I detect programmatically whether this file loaded successfully and

4条回答
  •  情话喂你
    2020-12-16 04:41

    In cases where you cannot modify the swf and adding an ExternalInterface is not an option, you can still use Javascript to get the status of the swf. For example, you can call document.getElementById(swf_id).PercentLoaded() from Javascript, and wait for it to be 100.

    That won't tell you what exception was thrown if the swf failed to load, but at least you will know for sure whether it loaded. Other useful calls are found here: http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html

提交回复
热议问题