Some detours: cross-domain calls between js and flash
One recent thing requires the use of calls between JS and FLASH. When doing it, there was no problem because it was in the same domain.
When it comes to cross-domain calls, life and death just don't work. After solving the cross-domain problem in the JS part, the problem still exists.
It turns out that you need to add a parameter to the FLASH script call:< param name=" allowScriptAccess" value=" always"/>, and the parameter defaults to: sameDomain.
Parameter description:
Always allow script actions to be executed at any time.
never prohibits all script execution operations.
samedomain allows script operations only if the Flash application comes from the same domain as the HTML page.
The default value used by all HTML publishing templates is samedomain.
Problem solved, FLASH correctly passed parameters to JS. I thought I was done, but the result was that JS could not pass parameters to FLASH. So, it was another burst of &&&%&*&%$.
As a result, you also need to add: System.security.allowDomain(""); to flash (you can change it to the domain you want to allow).
For more detailed instructions, please refer to the official website of ADOBE: www.adobe.com/cn/devnet/flash/articles/fplayer8_security_print.html
Copyright Protection: ShuDudu from the original article, reproduced Please keep the link: https://www.shududu.com/life/Some-detours-cross-domain-calls-between-js-and-flash.htm