IOS: (not) playing sound from local file system - Error #2032
Dear all,
I am working on an app where I want to (among others) play sound files from the local file system.
I have added a few mp3 files into my .ipa file.
With a small file browser in my app I can select any one of them which returns me a File object.
I then use this File object to do a URLRequest to load the sound:
var req:URLRequest = new URLRequest(file.nativePath);
sound = new Sound();
sound.addEventListener(IOErrorEvent.IO_ERROR, soundLoadError);
sound.addEventListener(Event.COMPLETE, soundLoaded);
sound.load(req);
It works in flash, but fails on the iPAD. Everytime I try to load, I get a IOErrorEvent with error code Error #2032
When I replace new URLRequest(file.nativePath) with URLRequest("http://.../testfile.mp3"), everything works fine!
Any help appreciated.
Is this a matter of Security settings? Can I change those?
Something to do with Sandboxing (whatever that is)?
or something to do with cross-domain access?
I have been looking around for days now and any help would be appreciated!
I am using Flash CS5.5 & AIR 2.7
Thanks, Marcus.
