My Flash project downloads data from the Internet through a PHP page on my website. It works properly in the following environments, but it won't work when I try to test it with a local HTML file that contains the SWF.
My SWF can connect to the Internet in:
Adobe Animate Test (Ctrl+Enter)
Adobe Animate Debug (Ctrl+Shift+Enter)
Standalone Flash Player
On my website in HTML (www.myWebsite.com/myFlash.html)
My SWF CANNOT connect to the Internet in:
local HTML file containing the SWF (C:\test\myFlash.html)
Is it possible to use a local HTML with embedded SWF to connect to the Internet? I've been trying to get it to work in Chrome, MS Edge, and IE11, but I have been unsuccessful.
Here is my HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Test</title>
</head>
<body style="background-color:#f0f5f8">
<object width="1280" height="720" data="Main.swf" style="border:1px solid black; margin-left: auto; margin-right:auto; display:block">
<param name="movie" value="Main.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<param name="play" value="true" />
<param name="loop" value="false" />
<param name="wmode" value="direct" />
<param name="scale" value="showall" />
<param name="menu" value="false" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreenInteractive" value="true" />
</object>
</body>
</html>
Edit: I made my SWF output the error message, and now when I try to play it in a local HTML, a TextField displays "securityError - Error #2048". That seems to be in regard to having a crossdomain.xml on the website, which I do have at www.myWebsite.com/crossdomain.xml:
<?xml version="1.0" ?>
<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="*" />
</cross-domain-policy>
Stand-Alone Flash Playeralso the PPAPI version (as used by Chrome and Edge)? Download the SA Player here (get theChromium/Operadebugger version for your OS). If yes then it should work. (2) Is your.htmlfor displaying the.swfin same location/folder as the swf file itself? (3) I would've thought a "Danger: local file talking to the internet here" security issue was the problem, but you say same swf works fine from same local folder when using the SA version. Will test this later... - VC.One