Question

I have a project written in ActionScript 3 using Adobe Flash Builder 4.5. It registers several functions in an ExternalInterface, so that they may be called from JavaScript.

If I access the Flash document on a server, for example http://localhost/, I am able to call the defined functions successfully. If I just open the file in my browser directly (through the file:/// protocol) it will fail with an error like this:

*** Security Sandbox Violation ***
SecurityDomain 'null' tried to access incompatible context 'file:///Users/foo/src/bar/baz/bin-debug/app.swf'

A reasonable security restriction, but it has a paradoxical consequence: I'm unable to debug the use of ExternalInterface because the Flash Builder debugger opens the document through file:.

It seems too absurd to be true that such an important feature can't be debugged normally.

How can I use the debugger with ExternalInterface?

Was it helpful?

Solution

There are two ways to solve this:

I generally prefer the latter.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top