Bacteria
Bacteria

Reputation: 1

is that possible to load a local file from remote swf?

Remote swf can not access a local file. Here is the error details :

SecurityError: Error #2148: SWF file http:// www.mydomain.com/ClipboardTest.swf cannot access local resource file:///C:\Temp\clip_image001.jpg. Only local-with-filesystem and trusted local SWF files may access local resources.

I have tried Security.allowDomain("*"); and cross-domain-policy-file. is there any solution?

Upvotes: 0

Views: 898

Answers (2)

user4152062
user4152062

Reputation:

You can't interact with any local files on a computer when the 'Network Only' is enabled. This is an important security feature of flash.

Although, I am pretty sure there's a way to save local files for game saves (like variables and stuff) on flash, even when it uses Network Only. If this is the type of thing you need, take a look at this.

Personally I've never tried it out so I don't know how capable it is. Hope it helps though.

Upvotes: 0

akmozo
akmozo

Reputation: 9839

I think that's impossible at least according to what Adobe said. Look here for more details : Remote sandboxes

For info, a very good tutorial speaking about flash security : Security Domains, Application Domains, and More in ActionScript 3.0

Upvotes: 1

Related Questions