How do I know when a file loaded into a Sound object is invalid?

I'm writing an app that allows the user to play various sound files.
Some of these files are mp3, but some may also be ogg, wma, etc.  The selection is out of my control, so I need the sound API to tell me if it can't play something.
To test, I loaded some test files into a sound object like so:
                var urlRequest:URLRequest = new URLRequest("http://support.microsoft.com/support/MediaPlayer/wmptest/samples/new/mediaexample.wma");
                var sound:Sound = new Sound();
                var soundChannel:SoundChannel = sound.play();
Even though Flex doesn't play wma's there is no error information or null objects anywhere.  Everthings seems to be fine to flex, I can even register for progress events and see the wma being loaded.
Just to see how far this goes, I loaded a gif instead of an audio file and the same thing happened.  Progress went fine with no errors of any kind even though I registered for every listed event.  As expected though, no sound played from the gif file.
What is the recommended way for checking if a file is not playable?

I'm looking more for an "is it playable" value (since it might be an FLA or FLV as well).
Even a meaningful length value would work (for some reason duration is set to a value even when loading a gif file - not sure what it means for a GIF to have a length of 96 milliseconds).
For now I'll have to filter on extension as you mentioned.

Similar Messages

  • How do you know when a file is done uploading to idisk?

    Hi,
    I work in film/video and I often put files up on my idisk that others can use or view. Often times my team and I use idisk to share files (pictures, music, program files) so that we can access the material on different computers all around the city.
    However, we can never tell when something has been entirely uploaded to our idisks. One of us will load it up to our idisk, tell the other it's up there, but when that person goes to the idisk, they see the folders, but there is nothing in them. So what we end up doing is checking, and checking, and checking the idisk to see if new files have "popped up" in the last 5 minutes.
    Just so I'm clear, here's what usually happens: I put a folder containing various forms of content on my idisk. It makes the "dong" noise and I see it up there-I click on the folder and all the content is in there. Then the circular clock starts spinning at the bottom of the window and the idisk icon is going through its "syncing" motions. And then I sit and wait for God knows how long because there is no way of telling how long before the files are up on the idisk.
    It's all VERY aggravating and I'm close to closing my idisk accnt and swearing off the whole "mobile me."
    Please, lend me some knowledge because I really like the apple workflows. But this one is seriously putting a damper on everything.

    Perhaps your topic would be better suited for the MobileMe iDisk forum:
    http://discussions.apple.com/forum.jspa?forumID=963
    It's unlikely the MacBook is specific to your problem so you might not get too much help here. I would assume Apple has multiple servers with all the iDisk information spread across the world. It's possible there's a bit of lag while they synchronize. But I don't know that for certain.
    -Doug

  • Streaming audio file over the network w JMF. How to know when the file end

    Hi
    I am streaming audio file over the network using JMF. I want to be able to know when a file end so I can close the streaming session.
    Can some one please help
    Thanks

    If you put a ControllerListener on the Processor that's associated with generating the RTP stream, it'll generate an "EndOfMedia" event when the end of the file is reached.

  • How long does it take to down load Firefox and how do I know it is down loading

    I have tried to down load firefox and during the down load iot tells me it starts at 1 minute remaining and it climbs fro this to 3 hours and I cancel the down load. How long does the down load take and how do I know it is down loading?

    WOO-HOOOOOO!  I got it all back!!  Yayyyyy! (jumping up and down).  You see, this is a picture file I've been working on for almost 15 years.
    OK.  Here's the skinny... I finally got an appointment with the Apple Store to discuss with a technician.  He went through the same steps I did (C-Opt-iPhoto) and then trying to repair, then rebuild the folder.  He tried several other options, which I had also tried, thank you to the Community Discussion boards!    He kept puzzling over the icon in front of my " iPhoto Library.photolibrary ".  It had a blank document in front of it, instead of the iPhoto icon.  Even though I could pull up every one of my pictures via Preview, I just could not get them to upload or open in iPhoto.
    He suggested I go back yet another day from the incident-day which messed up my library.  Skeptically, I did... (which I'd done quite a few times before).  EXCEPT.  This time, as I looked at my December 3, 2012 Pictures folder, there were some other files in it.  I had only been hi-lighting the iPhoto Library and trying to Restore.  You don't suppose...?  I hi-lighted everything in the Pictures folder, pressed Restore... and it started to transfer.  I waited perhaps 45 minutes.  (I had a 73GB file.)  But it restored everything - even the Events.
    Crux:  If iPhoto doesn't seem to be able to Restore your iPhoto Library, choose ALL the files in your backed-up Pictures folder (not just the iPhoto Library).  The technician's clue to me was he didn't think some needed sub-folders got transferred.  He was right. The visual indication was, when I opened Finder, the icon in front of it was a blank document.  It needs to have the iPhoto icon or some needed sub-folder didn't get transferred.
    I hope this helps!!
    Thanks for all the support!
    N'ama
    (MacBook Pro Retina with Time Capsule)
    Message was edited by: N\'ama

  • I am using a WD external hard drive for backing up my laptop with Time Machine, but I have to do it manually. How do I know when it has finished the back up? How long should it take?

    I am using an external WD hard drive for backing up my laptop. I have to do it manually, so I can't set Time Machine to just do it for me. How do I know when it is done backing up? How long should this take?

    Triple-click anywhere in the line below to select it:
    tmutil compare -E
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    The command will take at least a few minutes to run. Eventually some lines of output will appear below what you entered.
    Each line that begins with a plus sign (“+”) represents a file that has been added to the source volume since the last snapshot was taken. These files have not been backed up yet.
    Each line that begins with an exclamation point (“!”) represents a file that has changed on the source volume. These files have been backed up, but not in their present state.
    Each line that begins with a minus sign (“-“) represents a file that has been removed from the source volume.
    At the end of the output, you’ll get some lines like the following:
    Added:
    Removed:
    Changed:
    These lines show the total amount of data added, removed, or changed on the source(s) since the last snapshot.

  • How to list the JAR files loaded into the Oracle Database ?

    How to list the JAR files loaded into the Oracle Database ?

    From 11.1 onwards, the below two views are available to identify the jar files loaded into the Database.
    JAVAJAR$
    JAVAJAROBJECTS$
    By querying the JAVAJAR$ view you can know information about the JAR files loaded into the Database and using JAVAJAROBJECTS$ view you can find all the java objects associated with the given JAR file.
    These views are populated everytime you use LOADJAVA with "-jarsasdbobjects" option to load your custom java classes.
    But unfortunately this feature is available only from 11.1 onwards and there is no clear workaround for above in 10.2 or earlier.

  • I have my credit card on my daughter's i pod and i needed it to set up the apple id how do i make it so she can't spend any of the money but still get free apps.? Also she has a$15 app card on there how do I know when she buys apps which payment it takes?

    I put my credit card on my daughters new i pod. How do I block her from buying apps but still being able to download free apps? Also she has a $15 app card on the i pod how do i know when she buys something whitch payment it will take the visa or app card? PLEASE HELP A.S.A.P. THANK YOU

    You can
    Create a NEW account using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    You can have apps purchased from more than one account. It does complicate update apps though.
    - Go to settings>Store and sign out and sign into your account.
    - Apps are locked to the account that purchased them.
    - To update apps you have to sign into the account that purchased the apps. If you have apps that need updating purchased from more than one account you have to update them one at a time until the remaining apps were purchased from one account.

  • How do I know when my backup is complete to my external hard drive

    How do I know when my back up is complete to an external har drive...new user

    Welcome to Apple Support Communities.
    If you are using Time Machine, open , System Preferences, System, Time Machine.
    It will show the status of the backup drive, including the date of the first backup, as well as the most recent.
    Checkmarking the 'Show Time Machine status in the menu bar' will allow you to view the latest Time Machine backup by clicking on the icon in the menu bar, without going through System Preferences each time.
    Clicking Open Time Machine Preferences... from the menubar takes you to the same Preference screen as shown above.
    The first backup will take a while, up to several hours or more, because it is a complete backup of everything on your system.

  • How do I know when my unlock has been processed?

    Hi all,
    Sorry for what's probably a dumb question, but I can't find an answer anywhere.
    I have an AT&T iPhone 4S, and I recently called them to request an unlock.  Since it was on a business account while under contract, they had to submit a request directly to Apple instead of just using the web form.  However, they told me that they never received anything from Apple during the process that would indicate that I'll be notified once the request has been approved.  So from my understanding, completing the process on my end involves tethering to iTunes and restoring the phone - but how will I know when it's actually time for me to do that? 
    I should add: I am no longer with AT&T, or in touch with anyone else who is still on the account that I had been part of.  So if anyone else on that old account gets notified, I won't know.  And since I'm not with AT&T myself, I feel doubtful that they'd let me know.
    Thanks for your help!

    Apple does Not Unlock phones... This is done by the Carrier.
    About Unlocking...
    http://support.apple.com/kb/HT5014
    Also See this  AT&T Unlock Eligibility

  • How do it know which backup files to keep and which to delete?

    How do you know which backup files to keep and which to delete?

    If you still have all devices, just delete all. They will re backup.

  • How do you know when your MacBook is infected?

    Hey All. Well my question is how do you know when your MacBook is infected with a virus? I came off windows and i have norton antivirus so i have something to tell me there. But on the Mac OS you rarely get viruses and i dont have a anitvirus program, so how do you know when you have one? And what does it do?
    Thanks!

    Since no ones got one that I know of it is hard to say. I figure that when the day comes that someone writes a Mac virus you will know real quick what happens. If your concerned you could use ClamXav. I use it if I download something for my wife's PC but have never found anything yet.

  • How Do You Know When The Zen Touch Is Done Chargi

    I searched through the forums and couldn't find anything on this topic.
    I want to make sure that I don't overcharge my player, while still filling it to its enormous capacity. How will I know when it's done charging?

    On my touch there is a little icon in the upper left corner of the screen showing my battery symbol with a power volt thing over it to show it is charging. This changes back and forth until the charging is done, then there is nothing on the screen at all.
    -mrspike

  • I purchased the teacher and student lightroom 5. I put in my code and uploaded my evidence to show that I am a teacher. I am guessing it was sent through to someone. How do I know when I can use the software? I don't understand what to do next.

    I purchased the teacher and student lightroom 5. I put in my code and uploaded my evidence to show that I am a teacher. I am guessing it was sent through to someone. How do I know when I can use the software? I don't understand what to do next.

    Please refer below link for more information
    Education FAQ

  • HT1459 My I pod is not responding  how do I know when the ipod had actually died?????

    my ipod has the green lights however when i try to listen to music ....nothing ....i tried several head sets. how do i know when the ipod is finally dead

    Read the manual for a solution - iPod Manuals

  • How do we know, when the service contract is last modified ?

    How do we know, when the service contract is last modified and by whom ?
    thanks
    siva
    Edited by: sivapara on Nov 24, 2008 3:14 PM

    To add also in OKC_K_HISTORY_B for some actions.
    Thanks
    Nagamohan

Maybe you are looking for

  • STREAMING CLIP NOTES ftp HELP

    I am attempting to use Clip Notes to stream for the first time. It seems that I have all of my server setting correct because there is a a test4.wmv file appearing on my server. But, when I open the the pdf I am getting a connection error. Any suggue

  • Digital Signatures and Email Encryption on iPhone

    One of our clients has implemented a policy whereby all email communications with vendors must be digitally signed and encrypted. I know SSL allows the iPhone to create an encrypted connection to the email server. However, is there a way to actually

  • Inner classes should appear in jar?

    At first thanks for answering my question: I did resolve the problem of excluding files, so the .java and .html are not present anymore�.. but the problem stays: I do see the applet in the applet viewer but not on the safari (mac Version 3.0.4) brows

  • "The Photo Library Needs To Be Updated..."

    I recently installed ILife '09, with seemingly no problems. This evening, I received an error message requiring me to reboot the machine. After that, I attempted to open IPhoto and received the following message: "The photo library needs to be upgrad

  • Update will not load on my mac (10.6 operating system)

    i have been trying to load the update 5.0 for firefox - it never completes - it will keep trying until i close it - does it take hours to load?? is there something i should do prior to loading??