问题标签 [flexunit]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
111 浏览

apache-flex - Is there a way to dispatch event again in handler?

For my test I need to load about 1000 files and then perform some actions with each one by one. The problem is that I can not load another file in handler, flexunit just exit after calling load(). It works when I use another loader, with previously added Event Listener(see code), but I don't think it is a good idea to add ~1000 loaders.

I had also tried to create new loader object in handler function, but I got an "Asynchronous Event Received out of Order" error when trying to add Event Listener there.

What should I do here?

0 投票
1 回答
43 浏览

actionscript-3 - 在 IntelliJ 的 Flexunit 测试中无法访问托管在 MAMP 上的 php 文件

我在 MAMP 中运行主机,可通过http://localhost:8888https://myapp.co.uk:8890访问

我的问题是我的 flexunit 测试无法访问在该主机上运行的 php 脚本。

根目录是 crossdomain.xml 文件:

可以通过浏览器中的任一主机读取 crossdomain.xml 文件。

我正在尝试访问一个 php 脚本,我可以再次通过浏览器中的任一主机访问它。

如果我将构建配置设置为默认值,我会得到一个直接的 IOError。如果我将构建配置设置为使用-use-network=true,我会得到:

其次是安全沙盒违规:

不管我是让 crossdomain.xml 文件自动加载,还是使用显式加载它Security.loadPolicyFile(...)

我正在通过 IntelliJ IDEA 中的 flexunit 任务运行我的 flexunit 测试。

有什么建议么?我难住了。


另外:应用程序的swf能够访问MAMP文件没有问题,只是flexunit测试无法访问。我想知道将测试结果返回到 IntelliJ IDEA 是否可能与套接字有关。