Question
File.applicationDirectory.resolvePath fails to return the correct path in iOS
I have click.mp3 file in "assets/sounds/" directory.
When I try to load a sound like below, both works fine when testing on my PC but when deployed on iOS(my iPad2), #1 works but #2 will result in no sound. Am I doing something wrong?
I'm using Adobe FlashCS6 + Air3.4.
#1) var sound = new Sound(new URLRequest("assets/sounds/click.mp3")); #2) var sound = new Sound(new URLRequest(File.applicationDirectory.resolvePath("assets/sounds/click.mp3").nativePath)); then sound.play(); |
