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.

Hi Sanika,
this was something closer to that paragraph for "nativePath":
Some Flex APIs, such as the source property of the SWFLoader class, use a URL (the url property of a File object), not a native path (the nativePath property).
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.h tml#nativePath
but that is not exactly what I've read (maybe that was A-blog or post on someone from A-team on his personal blog or post on stackoverflow).
(myself I'm using and providing solutions for paths using FILE protocol - file URI schemes - mostly whenever I can and where it is supported)
regards,
Peter

Similar Messages

  • How to get folder(directory path only not file path) from local file system

    Hi Firends,
    How to get folder(directory path only not file path) from local file system , whenevr i will click on browse button.
    Please give reply for this one , if anybody knows.
    Thanks,
    Anderson.

    Hi Anderson,
    if you're using flash.filesystem.FileReference - then it is run in black box - except of filename, size and creation data (and few other properties available after some operation succeeded). This is part of security features in Flash runtime (described in header section):
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference .html
    This for example implies that user can download a content to local machine - but that content cannot be loaded back into Flash runtime. For this you would need either Air runtime flash.filesystem.File:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.h tml
    (so you would created Air runtime based application: desktop or mobile but not web, even as standalone project) or you would need one of 3rd party tools that add file access/file information features to standard Flash runtime applications converted to standalone native applications.
    hth,
    kind regards,
    Peter

  • My iPad (4th gen) will not play sound from videos played via Facebook. Anybody have suggestions?

    My iPad (4th gen) will not play sound from videos played via Facebook. Anybody have suggestions?
    I've restarted my iPad, there are no available updates that I am aware of.

    Try reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • Get image from local file system for printing

    If a user clicks Print, I would like to be able to print the
    stationery header if the user wants to print on plain paper. Can I
    pick up the image from the users local file system and add it
    directly to the print send object? Prior to this the user would
    simply upload the location of the image to the remote server where
    the swf resides, or do I have to ask him to upload the image itself
    and then download it again every time he uses the program?
    Doug

    Here is a snippet from the Flex 2 user guide about urlloader:
    When using this method, consider the Adobe® Flash®
    Player security model:
    For Flash Player 8 and later:
    Data loading is not allowed if the calling SWF file is in the
    local-with-file-system sandbox and the target resource is from a
    network sandbox.
    Data loading is also not allowed if the calling SWF file is
    from a network sandbox and the target resource is local.
    As far as I know there is no way for a user to "trust" an swf
    file. This is not like an activeX control.

  • Bluetooth Headset does not play sound from ipad touch 4th gen. ipod touch 4th gen. although it does pair ok! Please help!

    HM1200, BH99b, JabraBT2045 bluetooth headsets do not play music from ipad, ipod touch 4th generation, although it does pair ok. Why is that if it is compatable, why it does not play any music or sound via bluetooth headsets.  When I pair the headsets to Mac it does play music via bleutooth headsets!  Please help me!  Also, how to connect several or two bluetooth headsets to one device: Mac, or iPad iPod touch 4th generation? Please, reply as soon as possible!

    Your iPad has built-in WiFi. You cannot and don't need to use the USB dongle.
    Look in Settings > WiFi. Find the SSID of your wireless router, tap it's name and enter the WiFi password.

  • Can an applet loading from a browser read from local file system?

    I have to load my applet from a browser, and the "browse" button on it should be able to select and read certain files in the local file system( or the files located under the server's home directory). Is there a way to address the security issue? I know there are ways to enable an appletviewer to do it, but how about a browser?

    You'll need to have a signed applet.

  • JMF does not play sound for .avi file and no video for .mov file

    Hi,
    I am trying to use JMStudio to transmit media files from one computer to another.
    However, when I try to transmit .mov file it only plays audio no video is displayed on other computer.
    And when I transmit .avi file I can see the Video on other machine but it does not
    play any sound.
    I tried using capture devices like - webcam and mic and they work perfectly fine.
    Can anyone please tell me the solution for this.
    Thank you in advance.

    I discovered the same problem too..
    I think it is a general Format problem.
    When i analyzed the tracks in my .avi and .mov files before rtp streaming with jmf, I found each media containing just 1 track..
    This track was a video track, no audio at all.
    Other formats I tried, like .mpg, revealed both audio and video tracks, and performed perfectly.
    I'm still on more research.. will get the solution to you if u don't find one before I'm done..

  • Adobe AIR not playing sound from swf, but Flex-app in browser does. Why?

    Hi
    Why won't Adobe AIR play the sound in an swf animation I've got? It plays perfectly as an Flex Application in a browser.
    This works good (Animation is shown and sound is played):
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:SWFLoader id="testLoader" source="niceview.swf">
    </mx:SWFLoader>
    </mx:Application>
    This does not work: (Animation is shown BUT sound is NOT played):
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="500" height="400">
    <mx:SWFLoader id="testLoader" source="niceview.swf">
    </mx:SWFLoader>   
    </mx:WindowedApplication>
    I started out loading the swf from the filesystem, which is what I want to accomplish, but in this test the "niceview.swf" is located inside the source folder and therefore sandbox-violations should not be the issue here, right?

    A little bump.
    I still haven't found any solution to this.

  • HT201401 iphone 4S not playing sound from itunes or videos

    iphone 4S not playing music or sound through videos, it will ring, sometimes have the sound for keyboard clicks, have turned it off, reset, complete reset, no change, it seems to think it is on a dock connector and even switches back to dock connector when I m usin it in the car with Bluetooth, please help!!!

    I am actually having the same issue.  In Settings, lock sounds and keyboard clicks switches are set to "on" but that does not resolve it.  iTunes, videos, and game audio (in addition to lock sounds and keyboard clicks) will not work through the speaker, but all work when headphones are plugged in.  Ringtones and text tones function normally.

  • Airtunes will not play sound from youtube

    Hi, I have just bought Apple PC for myself. It Works flawlessly, except for one thing. I can play radio or podcasts, but I just can't seem to get trhe sound from youtube videos or movies to play through airtunes. The logic seems to be thatsounds from movies cannot be played through airtunes. It doesn't make sense, or does it?
    Any help is appreciated, P

    if you are trying to stream the youtube video from the Apple TV, it is as Brian says.
    if you are trying to stream it from your computer, see Meg's remarks.
    happy easter holidays, Y'all ...

  • QT not playing sound for MPEG1 files on my Intel Mac

    My QT Pro (latest version, automatically updated regularly) on my new Intel iMac will play the video of MPEG1 files, but no longer plays their audio. The same MPEG1 files play fine on my "Wintel" machine at work using QT for Windows 7.0.4 (the non-Pro version). QT still plays AVI and MOVs fine. Is there a known bug with the Intel version of QT?
    The last time I played an MPEG with no problems was on my older G4 Mac, just before purchasing the Intel Mac one month ago. I performed the software migration from old to new Mac using the Apple's Migration Assistant, then Software Update fetched and installed the newest version of QT. I haven't tried reinstalling an older version of QT yet. I was hoping to find some insight here before doing so.

    My QT Pro (latest version, automatically updated regularly) on my new Intel iMac will play the video of MPEG1 files, but no longer plays their audio. The same MPEG1 files play fine on my "Wintel" machine at work using QT for Windows 7.0.4 (the non-Pro version). QT still plays AVI and MOVs fine. Is there a known bug with the Intel version of QT?
    The last time I played an MPEG with no problems was on my older G4 Mac, just before purchasing the Intel Mac one month ago. I performed the software migration from old to new Mac using the Apple's Migration Assistant, then Software Update fetched and installed the newest version of QT. I haven't tried reinstalling an older version of QT yet. I was hoping to find some insight here before doing so.

  • CS4 does not play audio from .MTS file...only hash

    I have CS4 on Windows 8 64 bit and cannot get anything but hash from the audio....thoughts.

    http://forums.adobe.com/community/premiere/premierepro_previous?view=discussions for CS4 questions

  • My iPad will not play sounds on certain applications. ie: if I click on a video from FB sound will not play. If I go to YouTube and play the same video sound will play. Also certain games will no longer play sounds. They always played sounds but now won't

    My iPad will not play sounds on certain applications. ie: if I click on a video from FB sound will not play. If I go to YouTube and play the same video sound will play. Also certain games will no longer play sounds. They always played sounds but now won't now. I just went to my churches web site to watch live service and again no sound. I grabbed my dads iPad and the sound works fine.

    If you lose sounds for keyboard clicks, games or other apps, email notifications and other notifications, system sounds may have been muted.
    System sounds can be muted and controlled two different ways. The screen lock rotation can be controlled in the same manner as well.
    Settings>General>Use Side Switch to: Mute System sounds. If this option is selected, the switch on the side of the iPad above the volume rocker will mute system sounds.
    If you choose Lock Screen Rotation, then the switch locks the screen. If the screen is locked, you will see a lock icon in the upper right corner next to the battery indicator gauge.
    If you have the side switch set to lock screen rotation then the system sound control is in the task bar. Double tap the home button and in the task bar at the bottom, swipe all the way to the right. The speaker icon is all the way to the left. Tap on it and system sounds will return.
    If you have the side switch set to mute system sounds, then the screen lock rotation can be accessed via the task bar in the same manner as described above.
    This support article from Apple explains how the side switch works.
    http://support.apple.com/kb/HT4085

  • Embedded QuickTime files not playing sound

    I'm having trouble getting older, embedded QuickTime files to play properly. Many of them do play but without sound.
    An example:
    The embedded QuickTime files in questions 6 and 10 here...
    http://www.linguistics.ucla.edu/people/schuh/lx001/Web_Quizzes/Quiz_07/07web.htm l
    ...do not play sound.
    When viewing the files directly...
    Example: http://www.linguistics.ucla.edu/people/schuh/lx001/Web_Quizzes/Quiz_07/07_Quiz_m edia/0706_split_brain_red.mov
    ...the sound plays properly.
    I have done a bit of playing around on a few different machines and have found the following:
    2009 MacBook Pro: video and sound play correctly in Safari and Firefox
    OS X: 10.7.5
    Safari: 6.1.6
    Firefox: 36.0 with QuickTime Plugin ?
    QuickTime 7: ?
    QuickTime X:10.1
    2009 Mac Mini: video and sound play correctly in Safari and Firefox
    OS X: 10.8.5
    Safari: 6.2.3
    Firefox: 33.1 with QuickTime Plugin 7.7.1
    Firefox: 36.0.1 with QuickTime Plugin 7.7.1
    QuickTime 7: 7.6.6
    QuickTime X: 10.2
    2011 Mac Mini:  video and sound play correctly in Safari and Firefox
    OS X: 10.9.5
    Safari: 7.1.3
    Firefox: 31.0 with QuickTime Plugin 7.7.1
    Firefox: 36.0.1. With QuickTime Plugin 7.7.3
    QuickTime 7: 7.6.6
    QuickTime X: 10.3
    2011 iMac: no sound in videos, improper display of video with menu in both Safari and Firefox
    OS X: 10.10.2
    Safari: 8.0.3
    Firefox: 36.0.1 with QuickTime Plugin 7.7.3
    QuickTime 7: 7.6.6
    QuickTime X: 10.4
    2011 Mac Pro: no sound in videos, improper display of video with menu in both Safari and Firefox
    OS X: 10.10.2
    Safari: 8.0.3
    Firefox: 36.0.1 with QuickTime Plugin 7.7.3
    QuickTime 7: 7.6.6
    QuickTime X: 10.4
    Is this a Yosemite issue? Not being able to play older QuickTime 7 files properly? I'm not sure what else the issue could be since everything seems to work fine in 10.7, 10.8, and 10.9 (unfortunately, I have been unable to test this in 10.10 or 10.10.1). Maybe I'm overcomplicating a simple issue? Any help would be greatly appreciated.
    Thanks!

    Is this a Yosemite issue? Not being able to play older QuickTime 7 files properly? I'm not sure what else the issue could be since everything seems to work fine in 10.7, 10.8, and 10.9 (unfortunately, I have been unable to test this in 10.10 or 10.10.1). Maybe I'm overcomplicating a simple issue? Any help would be greatly appreciated.
    Some very interesting observations which peaked my own curiosity due to on-again, off-again nature of the playback. I suspect this is either a "bug" or represents content handling changes that are currently in the process of  "evolving." Not a web site programmer so I used iWeb to run some contrast-comparison tests on how audio was handled by the plug-in software when directly accessing the content by its URL and via the page embed strategies. My results mirrored yours in that:
    1) All legacy codecs tested (A-Law, IMA, QDM2, QPV, and u-Law) in an MOV file container played correctly in the QT 7 player.
    2) The same files all played correctly when content was accessed by the plug-in software directly using the URL reference.
    3) None of the files containing legacy audio compression formats would play audio using the plug-in software using a web page embedding strategy.
    4) An MP4 (H.264/AAC) version of you original clip played correctly in all instances.
    5) Replacing your QDM2 audio track with an AAC audio track in the original MOV file allowed the file to play correctly in all instances.
    Based on these observations, I suspect the problem is in the way the software is currently programmed to handle (or rather ignore) the embedded strategy content. However, as you indicated, it is probably time to update your files. Not only did the H.264/AAC version of your original file play in all instances, but it used less than 45% of the file space/bandwidth for the settings I employed as compared to your original "0706_split_brain_red.mov" original file.

  • I have completed a song on the GarageBand app which plays fine. I export it via email and it opens up in iTunes on my PC fine but when you play it there is no sound from the file. Anyone know I am doing wrong please?

    I have completed a song on the GarageBand app which plays fine. I export it via email and it opens up in iTunes on my PC fine but when you play it there is no sound from the file. Anyone know I am doing wrong please?

    you might need codecs on you pc. i find vlc player and codecs is perfect for music and videos.

Maybe you are looking for