Skip to main content
Inspiring
September 27, 2012
Answered

AIR 3.5 can't load SWF graphics and/or app: folder "Multiple application domains are not supported"

  • September 27, 2012
  • 3 replies
  • 8244 views

"Error #3747: Multiple application domains are not supported on this operating system." shows up and breaks my app when I try to do something as simple as load a URL to use a graphic from the File.applicationDirectory on iOS on AIR 3.5. I am just trying to load graphic files included in my app.

I don't know why it is going on about "Multiple application domains." I am not trying to do any fancy stuff and the exact same thing was working on AIR 3.4 and below.

What is this error and how do I fix it? No information comes up about it in search engine result.

This topic has been closed for replies.
Correct answer Colin Holgate

Read the AIR 3.5 release notes, there's information in there about how you have to set the loaderContext in order for it to work.

3 replies

Nimisha1
Participating Frequently
December 12, 2012

Hello,

Feature Multiple SWF on iOS has been introduced in AIR 3.6 Beta build and you can download it from here http://labs.adobe.com/downloads/air.html

Also to know more about the feature refer to http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air-apps-on-ios/

We would like to hear your feedback, please let us know if you face any issues.

Thanks,

Nimisha

Nimisha1
Participating Frequently
September 28, 2012

Hi,

Are you trying to load a SWF in any way from the loader in your app? Would you mind sharing the code that you're using in your app which is giving Error?

Thanks,

Nimisha

FLAdudeAuthor
Inspiring
September 28, 2012

Colin's fix from the release notes seems to have fixed the issue.

But yes, it is using a Loader to load an SWF if you are curious. It is not trying to run any ActionScript on the SWFs, just plain SWFs for graphics, not code.

here is the main lines of code calling the load

     holder.loader = new Loader();

...

     //this line updated with the fix

     var loaderContext:LoaderContext = new LoaderContext(false,ApplicationDomain.currentDomain,null);

     var urlReq:URLRequest = new URLRequest(url);

          holder.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,holder.loadedHandler);

          holder.loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,holder.errorHandler);

     holder.loader.load(urlReq,loaderContext);

Adobe Employee
September 29, 2012

That is indeed the recommended way of loading an external SWF in an AIR app on iOS.

A SWF is loaded in a particular ApplicationDomain which is specified in the Loader.load call via the LoaderContext. By default, a child SWF is loaded in a child domain of the root SWF's application domain. However, as we don't support multiple application domains on iOS, you need to specify the domain as ApplicationDomain.currentDomain to be able to load an external SWF on iOS.

Colin Holgate
Colin HolgateCorrect answer
Inspiring
September 27, 2012

Read the AIR 3.5 release notes, there's information in there about how you have to set the loaderContext in order for it to work.

FLAdudeAuthor
Inspiring
September 27, 2012

I guess this release is so fresh that the search engines haven't indexed that PDF...

I added the line of code from there and it appears to be working...

Is AIR 3.5 beta allowed to be released to the App Store? I don't see a watermark on it, but I recall some betas you're not supposed to release with yet? Or is that just for 'private beta'?

I might be close to having this ready to submit...

September 27, 2012

Although, there are no legal restrictions on uploading an applciation with a Beta version anymore, but it is still not a recommended.practice.

You may find details at:

http://labs.adobe.com/technologies/flashplatformruntimes/air3-5/

Click on Product Details > FAQs