Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Although it may not seem intuitive, this seems like a security issue. When AS2 content loads up other AS2 content, they have to be in the same security sandbox in order for them to run.</p> <p>I created a quick sample just to test this theory and I was right. The reason it works in Flash is because the AS2 content is in the same sandbox as the content it is loading. But AIR security is different. So when you load up the AS2 content in AIR (using the logic you supplied), the loader gets put in the application sandbox. The sandbox is now different than the content it is loading, so it refuses to load them. This explains why it works when using an HTML wrapper. When the HTML loads up the swf, it probably gets put in the local-with-network sandbox which is the same as the content.</p> <p><strong>So... How do you fix it?</strong> You can try to load your content up in a different security sandbox. But really the problem is that AS3 security isn't playing nice with the AS2 security. My suggestion would be to create the AIR application without an AS3 wrapper. You can't do this directly in the tooling, but you should be able to use the ADT packager to do it. In the xml descriptor, make the initial content the AS2 swf, and package it together. Now when you launch your AIR application it uses the AS2 swf as the main application. Suddenly your files should all be in the same security sandbox, and Flash won't prevent any of the content from running.</p> <p>You can test this locally by using ADL to launch the app instead of launching it directly from Flash Professional or Flash Builder. (They both use ADL, but if you call it directly you have more control over the arguments used.)</p> <p><strong>EDIT:</strong> Apparently you can't have an AS2 swf as the main swf for Desktop AIR applications. (I've tested using ADL on desktop and it works, but I have been told that you won't be able to install an AIR application on desktop with this setup.) So for desktop you probably want to use the HTML workaround. <strong>This is supported in AIR for TV</strong>, so this would work on those devices.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload