Is it possible to debug ExternalInterface through

2019-05-28 10:35发布

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?

1条回答
冷血范
2楼-- · 2019-05-28 11:09

There are two ways to solve this:

I generally prefer the latter.

查看更多
登录 后发表回答