Trying to load MP3 from desktop to AIR application

I'm trying to load an MP3 file into an Air application.
Here's some code. The first 2 lines are in my constructor
fileToOpen.browseForOpen("Open", [new FileFilter("MP3",
"*.mp3")]);
fileToOpen.addEventListener(Event.SELECT, fileSelected);
private function fileSelected(event:Event):void
var stream:FileStream = new FileStream();
trace(fileToOpen.nativePath);
// sound = new Sound(new URLRequest(fileToOpen.nativePath));
// trace(sound);
stream.open(event.target, FileMode.READ);
trace(stream.bytesAvailable);
sound = new Sound(stream.readBytes(stream.bytesAvailable));
channel = sound.play(00000);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
Using URLRequest gives me the error Error #2044: Unhandled
IOErrorEvent:. text=Error #2032: Stream Error. I can't seem to load
a file when I give it the full path. Then with the file stream, I
don't even know what I'm doing. I don't know which method I'm
supposed to use to load the file into a sound object. Please
help...

I figured it out. I tried url instead of nativePath for the
file object and it worked.

Similar Messages

  • IPhoto doesn´t work after trying to load photos from iphone with newer version. Help!!!!!

    First, I do not have a recent back-up of my iPhoto Library. (But, I learned my lesson for next time). When I tried to load photos from my super duper up to date software I-phone to my outdated iPhoto on the computer (only version 8.1.2), a message came that I cannot open your Mediateck with this version of iPhoto,. You have changed your mediathek with a newer version of iPhoto.
    (in German, because I am writing from Germany "Sie konnen ihre aktuelle Mediathek nicht mit dieser Version von iPhoto öffnen. Sie haben Ihre Mediathek mit einer neueren version von iPhoto geändert").
    How can I save all the baby pictures of my 3 kids??Help

    Did you update iPhoto?
    If not:
    Try these in order - from best option on down...
    1. Do you have an up-to-date back up? If so, try copy the library6.iphoto file from the back up to the iPhoto Library (Right Click -> Show Package Contents) allowing it to overwrite the damaged file.
    2. Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    3. If neither of these work then you'll need to create and populate a new library.
    To create and populate a new iPhoto 08 library:
    Note this will give you a working library with the same Events and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.
    In the iPhoto Preferences -> Events Uncheck the box at 'Imported Items from the Finder'
    Move the iPhoto Library to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library (Right Click -> Show Package Contents) on your desktop and find the Originals folder. From the Originals folder drag the individual Event Folders to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.

  • I am trying to load photos from my computer on to my ipad but keep getting the message "the device is no longer connected to the computer. It keeps popping up and I am stuck. This happened after I upgraded to the latest itunes

    I am trying to load photos from my computer on to my ipad but keep getting the message "the device is no longer connected to the computer". It keeps popping up and I am stuck. This happened after I upgraded to the latest itunes software.

    Greetings cdewinkel,
    It seems your iPad is not staying connected to your computer during syncing. The following article provides a number of troubleshooting steps which may help. This article is intended for devices which are not being detected, but the troubleshooting steps are relevant to your issue:
    If you don't see your connected device in iTunes for Mac - Apple Support
    Make sure that your device is on
    Also make sure that you can get to the Home screen.
    Get help if you have one of these issues:
    Your iOS device won't respond or turn on.
    Your iPod won't turn on.
    You forgot your passcode or your device is disabled.
    Make sure that your Mac supports your device
    See the system requirements for iPhone, iPad, or iPod.Check your USB connections
    Unplug other USB devices from your Mac and try again.
    Try a different USB port.
    Try a different USB cable. 
    Learn more about using USB cables with your Mac.Make sure that your device trusts the computer
    You might get an alert if you haven't connected your iOS device to this computer before. Unlock your device and tap Trust. 
    Learn more about the Trust This Computer alert.Restart your device
    Restart your iOS device or reset your iPod.Restart your Mac
    Turn your Mac off and back on.Update your software
    Check for software updates on your Mac.
    Check for an iTunes update.
    Check your security software
    If you have security software installed, learn how to resolve issues between iTunes and your security software. 
    Get more help
    If you still don't see your device in iTunes, contact Apple Support.
    Thank you for contributing to Apple Support Communities.
    Best,
    Bobby_D

  • I'm trying to load everything from my phone to computer so I can reset for phone and start clean and when I plug it in the computer nothing comes up and there is a connection what going on

    I'm trying to load everything from my phone to computer so I can reset for phone and start clean and when I plug it in the computer nothing comes up and there is a connection what going on

    Is your iPhone not showing up in iTunes sidebar, or is iTunes not just launching automatically?
    The things that you can check are:
    1) Launch iTunes manually
    2) Restart or reset your iPhone (http://support.apple.com/kb/ts3281)
    3) Check your cable including disconnecting and reconnecting it on bot the phone end and the computer USB end.
    4) Reboot your computer
    5) As a last resort, take it to the Apple Store so they can check the hardware

  • Error when trying to load data from ODS to CUBE

    hi,
      Iam getting a short dump  when trying to load data from ODS to CUBE. The Run time error is 'TYPELOAD_NEW_VERSION' and the short text is 'A newer version of data type "/BIC/AZODS_CA00" was found than one required.please help me out.

    Hi,
    Check this thread.........Ajeet Singh  has given a good solution here.........
    Re: Error With Data Load-Getting Canceled Right Away
    Also check SAP note: 382480..................for ur reference............
    Symptom
    A DART extraction job terminates with runtime error TYPELOAD_NEW_VERSION and error message:
    Data type "TXW_INDEX" was found in a newer version than required.
    The termination occurs in the ABAP/4 program "SAPLTXW2 " in "TXW_SEGMENT_RECORD_EXPORT".
    Additional key words
    RTXWCF01, LTXW2U01, TXW_INDEX
    Cause and prerequisites
    This problem seems to happen when several DART extraction jobs are running in parallel, and both jobs access table TXW_INDEX.
    Solution
    If possible, avoid running DART extractions in parallel.
    If you do plan to run such jobs in parallel, please consider the following points:
    In the DART Extract configuration, increase the value of the parameter "Maximum memory allocation for index (MB)" if possible. You can estimate reasonable values with the "File size worksheet" utility.
    Run parallel DART jobs on different application servers.
    As an alternative, please apply note 400195.
    It may help u.........
    Regards,
    Debjani.......

  • Trying to load efax from new hp emachine.  you get this; You can't open the application "eFax Messenger" because PowerPC applications are no longer supported.

    trying to load efax from new hp emachine.  you get this
    ;You can’t open the application “eFax Messenger” because PowerPC applications are no longer supported.
    when is hp, efax, or apple getting their act together to fix the issue?

    Hi,
    The eFax service provided with the HP device is a remote cloud feature and have nothing to do with installing any software on your computer.
    Any software named eFax you may trying to install is not affilated with HP in any way, as well I doubt if it is affilated with the eFax service in any manner.
    In order to enable and use the eFax feature please follow the steps below:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02970945&tmp_task=useCatego ry&cc=us&dlc=en&lang=en&lc=en&product=5070121
    Regards,
    Shlomi

  • Crystal Reports XI R2 Server problem when trying to load groups from LDAP

    Hi,
    I'm using Crystal Reports XI R2 SP4 on RedHat Linux. My users are being authorized through LDAP (OID). My problem is that after removing all groups (right now no groups/users are visible in CMC) in CMC Authentication tool and then trying to add them again I'm receiving following error:
    "LDAP: Failed to commit objects to server : Duplicate object name in the same folder."
    I've checked connectivity to LDAP server and it's ok. Could it be connected to CMS problems/corruption? Any help/suggestions would be appreciated.
    Regards,
    Marcin

    The only personal folders visible from under Admin panel are for users Administrator and Guest. I've tried to query CMS tables but these store entries not in plain text so I cannot identify entries connected to personal folders. I have also tried to do this via Query Repository tool but all returned entries were ok.
    I have also noticed that when trying to load group from LDAP after it returns error "LDAP: Failed to commit objects to server : Duplicate object name in the same folder." entry for this group is created in CMS table. Also this group is then visible in admin Groups panel. No users are created with the group and when I'm trying to list users belonging to added group it returns "internal secLDAP security plug-in error" but without any other suggestion what went wrong.

  • I am trying to record a from my Macbook Air and an annoying loud sound, like a burp, will suddenly erupt from the MacBook, necessitating I start again. Any ideas on how I may stop this, or what it is??

    I am trying to record a meditation from my Macbook Air and an annoying loud sound, like a burp, will suddenly erupt from the MacBook, necessitating I start again. Any ideas on how I may stop this, or what it is??

    Click on the blue Internet Recovery in nbar's post. That is a link to what computers can run Internet Recovery.
    Do a backup,  preferable 2 separate ones on 2 drives. Boot to the Recovery Volume (command - R on a restart or hold down the option/alt key during a restart and select Recovery Volume). Run Disk Utility Verify/Repair and Repair Permissions until you get no errors.  Reformat the drive using Disk Utility/Erase Mac OS Extended (Journaled), then click the Option button and select GUID. Then re-install the OS.
    OS X Recovery
    OS X Recovery (2)
    When you reboot, use Setup Assistant to restore your data.

  • HT4101 I have used my SD card reader with the lightning connector just fine until this awful OS 7 update! Now nothing works and all I get while trying to load pictures from my SD card to my iPad is that my device is not supported!

    Anyone having the same problem with the new OS7? I can no longer load pictures from my SD card to my iPad using my adapter.

    Are the card readers apple ones or knockoffs? Unfortunately iOS7 brought with it software that looks for the authentication chip in  the cables and docks. If the manufacturer got permission from Apple to make devices then it should be fine, but if the manufacturer didn't get apple's permission then their chip isn't recognized, generating that error.
    If your connectors are Apple ones have you tried to reset your device? Hold down the sleep and home keys for about 20 seconds or so until your iPad reboots. Then try again.

  • Error message saying some of library updated use newer version when trying to load pictures from a CD

    Keep getting this error message when trying to load a cd of pictures from our newer MacMini onto an older MacBook.  Suggestions?

    What version of iPhoto on the Older MacBook?
    What version of iPhoto on the newer Mini?
    How did you make disk?
    Regards
    TD

  • I am trying to load magazines from the book store to the bookshelf but am getting "an error occurred"  what is happening? This is an iPad 3wi fi

    I have an iPad 3 wifi model. I am trying to place magazines from the book store on the bookshelf app but continue to get the message " an error has occurred". HELP!  Thanks

    You can not load magazines to the bookshelf.  Some magazines go there automatically and can not be placed elsewhere.  Other magazines do not go there and can not be moved there.  It all depends on the relationship between the publisher and Apple.

  • Integrated Planning - trying to load data from basic to realtime cube

    I have created a mulitprovider for my basic and realtime cube, and trying to copy data from basic to realtime using standard copy function in IP. It is not erroring out but data is not getting copied either. Both cubes having exactly the same structure. I can do a export datasource or a BPS multiplanning area..but I need a solution in IP..Any help would be appreciated...Thanks much..

    Infoprovider --> Multiprovider
    Agg Level --> Selected fields need to be copied
    Filter --> None selected, wanted to copy as is
    Pl. Fnc --> Standard Copy.
                    char usage: Selected infoprovider for 'changed'
                    to parameters: selected all key figs ( percent and amount)
                    from and to values: Basic to realtime
    Let me know.

  • Trying to load dvd from hp to ipod

    i am trying to load a dvd that is in my hp pavillion onto ipod and cant figure out how to do it?

    Welcome to Apple Discussions!
    See this...
    http://www.videora.com/en-us/Converter/guides.html
    Search the forums for other options.
    btabz

  • Jar file - trying to load audio from within it

    I am writing a Game using NetBeans. All works fine when run from within NetBeans, but problems occur when run from a JAR executable.
    The Audio files are not loading. I had a Similar problem with the Images, but resolved it with getResources() etc.
    Any help would be much appreciated, and will post my game when its finished, horray
         * Loads a sequence from the file system. Returns null if
         * an error occurs.
        public Sequence getSequence(String filename)
            try
                return getSequence( new FileInputStream(filename));
            catch (IOException ex)
                ex.printStackTrace();
                return null;
         * Loads a sequence from an input stream. Returns null if
         * an error occurs.
        public Sequence getSequence(InputStream is)
            try
                if (!is.markSupported())
                    is = new BufferedInputStream(is);
                Sequence s = MidiSystem.getSequence(is);
                is.close();
                return s;
            catch (InvalidMidiDataException ex)
                ex.printStackTrace();
                return null;
            catch (IOException ex)
                ex.printStackTrace();
                return null;
        }

    new FileInputStream(filename))That only works for files. Resources in JARs are not files. You should always (when possible) use getClass().getResourceAsStream() to open streams on resources, loading them from the classpath -- regardless of whether your app is a bunch of loose files or in a JAR.

  • I want to hide the blue title bar from my adobe air application

    Hello
    I'm doing an aplication with Flash CS4, using adobe air in as3. I have some frames, and in the frame 25 there's a stop, when user clicks a button, go ahead to frame 27 and stage resize the whole screen, just like a FULL_SCREEN, and then I load an pdf. I can't use FULL_SCREEN or FULL_SCREEN_INTERACTIVE property, because doesn't works the pdf loaded (even adobe help say it), so I would like to simulate it. The application it will be use in windows ( I am not sure if XP, vista, but windows). So when resize the stage, to load pdf, then and ONLY then, I want the title bar disappears, just to simulate full_screen.
    How can I do, to make in a desktop application that ?
    Thanks in advance

    Open the Air Application descriptor file(eg: airproject-app.xml) for your application and
    uncomment the <systemChrome></systemChrome> tag.
    Set it to none like:
    <systemChrome>none</systemChrome>
    It will work.

Maybe you are looking for

  • System error in message monitoring

    Hello, Scenario is proxy to database. Status seems to sytem error in message monitoring. Error detail is  In audit log of message details as belows: JDBC Message processing failed, due to Error processing request in sax parser: Error when executing s

  • Delete Track from iTunes Library if in User Playlist

    Hello I want to delete [music] tracks from the main iTunes [10.7] library if they are in a user playlist. I saw (on dougscripts.com) an approach where the database id was obtained from the track in the playlist and this was then used to delete from t

  • What are the units of the DAQmx counter?

    Hello, I created this VI and several similar ones a few months ago, but, I have forgotten some of what I did back then.  I believe that this VI should measure period, using the counter on the DAQ chassis.  Can anyone tell me the units of the period m

  • Disk Utility can't repair disk

    Hi, I just saw that the amount of memory left on my HD just dropped around 60GB, so I used the "Verify Disk" option on Disk Utility, and the output was: Verifying volume "Macintosh HD" Performing live verification. Checking Journaled HFS Plus volume.

  • About upgrade to windows 8????

    if i upgrade to windows 8, can i back to windows 7 when i want????