Skip to main content
Known Participant
October 1, 2013
Question

AIR 3.9 for android, how to load file in primordial worker

  • October 1, 2013
  • 1 reply
  • 1783 views

when i use AIR 3.9 for android version of my game, i can not load file in primordial worker swf.

I use the code below:

var loader : URLLoader = new URLLoader();

loader.dataFormat = URLLoaderDataFormat.BINARY;

loader.addEventListener(IOErrorEvent.IO_ERROR,

     function (evt : IOErrorEvent) : void

     {

          trace("load file error: " + evt);

     }

);

loader.addEventListener(Event.COMPLETE,

     function (evt : Event) : void

     {

          trace("load file completed: " + evt);

     }

);

loader.load(new URLRequest("./music/bgm/bgm_title.mp3"));

and already set the second parameter of "WorkerDomain.current.createWorker(swf:ByteArray, giveAppPrivileges:Boolean = false):Worker" giveAppPrivileges to be true.

this code can work on desktop AIR, but failed in android AIR, it tells a IOErrorEvent, and report "Stream Error".

So, is it a bug of AIR 3.9 for android, or is there somthing i missed?

Thank you very much for any help.

This topic has been closed for replies.

1 reply

Nimisha1
Participating Frequently
October 1, 2013

Hi,

The above code is working at my end and I don't receive any "Stream error" on Android. Can you please check if you're using -swf-version=22?

Also can you provide a sample app(swf, app-xml, assets and sources) with which I can repro the issue you're facing?

Thanks,

Nimisha

Known Participant
October 1, 2013

I'm sorry for my wrong question,

I can not load file in non-primordial worker instead of primordial worker.

Nimisha1
Participating Frequently
October 1, 2013

That's okay

Can you please share a sample app(swf(s), app-xml, assets and sources) with which I can repro this issue? My email-id is nimisha1@adobe.com.