Adobe® AIR™ Music Player

This article is an update of my previous article about a music player I built using the Apollo Alpha 1 release. Now that Apollo has become AIR (Adobe Integrated Runtime) and the beta is available on Adobe Labs, I thought I should update the Music Player for the new AIR release.

Click the above image to download and install the AIR Music Player. Note that your system may interpret the .air file as a .zip. If this happens, pick “Save As” instead of “Open”, rename the file to “MusicPlayer.air”. Once the file has downloaded, launch it and it will install a new version of the Music Player.

10 Responses to Adobe® AIR™ Music Player

  1. Tony says:

    Any chance we could get the source code to this app like your previous version please?

  2. Hey Peter, I was trying to check out your musicplayer but it gave me errors, thought you might want to know:

    Error: Error #2161: File or directory does not exist.
    at flash.filesystem::File/listDirectory()
    at com.adobe.musicplayer::MusicLibrary/::buildArtistList()
    at com.adobe.musicplayer::MusicLibrary$iinit()
    at com.adobe.musicplayer::MusicLibraryPanel/com.adobe.musicplayer:MusicLibraryPanel::createChildren()
    at mx.core::UIComponent/initialize()

  3. peter says:

    hi,

    i have this error message when i launch your app.

    Error: Error #2161: File or directory does not exist.
    at flash.filesystem::File/listDirectory()
    at com.adobe.musicplayer::MusicLibrary/::buildArtistList()
    at com.adobe.musicplayer::MusicLibrary$iinit()
    at com.adobe.musicplayer::MusicLibraryPanel/com.adobe.musicplayer:MusicLibraryPanel::createChildren()
    at mx.core::UIComponent/initialize()
    at mx.core::Container/initialize()
    at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
    at …

    any idea ???

  4. Peter Ent says:

    I’m putting the source code for this out there today. There is very little changed, really just ApolloApplication changes to WindowedApplication and there are one or two minor changes which the compiler can tell you. You also have to change ApolloApplication to WindowedApplication in the CSS file.

  5. Peter Ent says:

    If you get that error, trying creating C:\Music directory; I’ll have to check the code. That was the original location until I added the search for it in My Documents. I’ll keep you posted.

  6. John O'Melia says:

    I’m getting the following error when attempting to install:

    This application could not be installed or launched (AIR file C:\Music\MusicPlayer.air is invalid: Unrecognized version namespace “http://ns.adobe.com/air/application/1.0.M4”.).

    Any ideas?

    Thanks.
    ——————–
    Peter: You must have the latest AIR player installed, not the Apollo Alpha player. Look at http://labs.adobe.com/technologies/air/ and click the Download AIR link.

  7. John O'Melia says:

    Thanks, that did it. Nice app!
    I did find an interesting bug in the way it accesses songs/albums. When you set your library, it seems to only want to access the music by folders with albums one level down. For that it works fine. If I have a folder with artists inside that folder and albums inside those, it tries to treat the artist folder as albums and then throws and error:

    Error: Error #2161: File or directory does not exist.
    at flash.filesystem::File/listDirectory()
    at com.adobe.musicplayer::SongList/createList()
    at main/::showTracks()
    at main/___main_MusicLibraryPanel1_showAlbum()
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()[C:\Documents and Settings\acrorel\Local Settings\Temp\aslibc-28157\EventDispatcher.as:209]
    at mx.core::UIComponent/dispatchEvent()
    at com.adobe.musicplayer::MusicLibraryPanel/::showAlbum()
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()[C:\Documents and Settings\acrorel\Local Settings\Temp\aslibc-28157\EventDispatcher.as:209]
    at mx.core::UIComponent/dispatchEvent()
    at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::mouseClickHandler()
    at mx.controls::Tree/mx.controls:Tree::mouseClickHandler()

    If the folder contains songs instead of albums, it thows the same error. Apparently it’s trying to create a list of songs from albums where there aren’t any albums.

    An example of this kind of hierarchy is the way iTunes stores music. iTunes default folder for music files is “My Music/iTunes/iTunes Music” and then each album in its own folder.

    I know this is just a sample app to show off the abilities of AIR, but I thought you’d want to know about any issues.

    Again, very nice app, it’s got me excited about AIR!
    ————
    Peter: Glad this helped and got you interested. Being able to scan more deeply into the music folder is, ah, an exercise left to the reader, at least for now.

    I know the reading of the MP3 files for IDEV info is slow – still not sure that’s due to my programming or something to do with the AIR File class. Stay tuned on this.

  8. serhado says:

    Thanks, AIR Music Player is well for music.

  9. bedava video says:

    very nice player thank you adobe!

  10. Bodrum Otel says:

    very nice info thank you