Does ExternalInterface work in file: protocol?

Can someone confirm that ExternalInterface works with the file: protocol or points to some documents that say it won't?

+7
source share
3 answers

It starts to look like it doesn't work. this page says:

Scripting in any direction between local HTML files and local SWF files — for example, using the ExternalInterface Class — requires that both the HTML file and the SWF file are involved in the local sandbox proxy. This is because the local security models for browsers differ from the local security Flash Player model.

And here is what he says about an isolated sandbox:

Local trusted sandbox - local SWF files registered as reliable (by users or installer programs) are placed in a local trusted sandbox. System administrators and users also have the ability to reassign (move) a local SWF file to or from a localized isolated sandbox for security reasons (see Administrative User Controls and User Control). SWF files that are assigned to an isolated sandbox interact with any other SWF files and can download data from anywhere (remote or local).

Thus, either the installer or the user would have to put swf in the afaict local trusted sandbox ..

+8
source

By default, ExternalInterface will issue security error # 2060 if you try to use it on the page: //. However, if you add the option <param name="allowscriptaccess" value="always"/> to your embed, it should be able to talk with JavaScript.

docs on ExternalInterface refer to this in the exception documentation for addCallback () and call ().

EDIT:. Having discussed this further in the comments below, it seems that although this works for me on a Mac, it does not work on Windows. Eric's answer provides more details on why this is happening.

+3
source

Alternatively, have you considered using Air and using FileSystem?

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html

-one
source

All Articles