I have a flash app (SWF) running Flash 8 embedded in an HTML page. How do I get flash to reload the parent HTML page it is embedded in? I've tried using ExternalInterface to call a JavaScript function to reload the page but that doesn't seem to work.
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
Check the ExternalInterface in Action Script. Using this you can call any JavaScript function in your code:
In the Embedding HTML code enter a JavaScript function:
This has the advantage that you can also check, if the function call succeeded and act accordingly. getUrl along with a call to JavaScript should not be used today anymore. It's an old hack.
Quick and dirty: This will work in most cases (without modifying the HTML page at all):
Simple one line solution.
Try something like this:
getURL("javascript:location.reload(true)");
In Flash 10 you can do: