Brief
The name of this application is SEEQPOD LITE and it was built as an example of my AS 3 coding style and oop practices. It is a scaled down version of seeqpod.com and uses it's Rest API to perform music searches. I built this application as a demo and now am offering up the source code to the public. This app took me 20 hours to build (5 for research/planning, 10 to build, and 5 to debug). Enjoy!
You can download the source code and Eclipse Project here.
About
There are 3 parts to the application: the Search Box, the Playlist, and the MP3 player/Album Art Display. I designed the UI to be simple and clean enough for people to use who are unfamiliar with seeqpod to use it. I loosely modeled my design off of the mp3 player found in iPhone/iPod Touches. I built the application in Eclipse using FDT 3 plugin (my editor of choice). I also have this version controlled on my server's dev box with CVS. Lastly, I made the application self contained and is ready to be exported to AIR to provide a stand alone desktop RIA distributable version.
Usability
When the application loads up, users are presented with a search field. Once they perform a search, the generated playlist from seeqpod's Rest API is displayed. When a user clicks on a song, the playlist disappears and the song begins playing. The corresponding album art is displayed and the user can control the songs with the overlaid control buttons. To go back to the playlist they can roll over the minimized version on the right of the screen. I wanted to keep the track numbers visible so people could always see what track they were playing. You can begin a new search at any time by going into the search box and hitting return to activate the search.
Missing Features
There are several missing features I would have loved to add in but ran out of time. Some of them I have displayed in the demo but have disable.
The top feature is the back and next buttons in the controls. This would tie into the playlist class and allow the user to navigate up and down the playlist tracks without having to go back to the list and manually select a track. This would also work well with the minimized playlist view so users could see the track number move up and down as they go through the playlist.
Next would be the 3d album art rotation. I had begun implementing the 3d rotation but moved my focus over to the application as a whole and wanted to make sure that it was as polished as possible. With that in mind I used a reflection utility and reflection container class (http://flashartofwar.com/?p=3) I had built prior to the demo as a substitution. I have built something similar to this in AS 2 but was not able to port all of that code over for this demo. Here is an example of what I have built in the past: http://web.bobmarley.com/catalogue/index.jsp?catpage=albums.
I also came across these 3d examples that would probably be the foundation to adding 3d album art support:
http://www.rubenswieringa.com/blog/distortimage
http://pixelfumes.blogspot.com/2006/07/business-card-flip-effect-class-with.html
There is currently no message letting a user know that the search did not return any results. Right now it just silently fails. I would probably do this the same was as I handle sounds that couldn't be loaded and use the LightBox calls to display the message.
The final feature I would love to have added in was the video support and also seeqpod's own "what you would like" selection from a submitted song name. These two features would be easy to implement. Inside of my main application class (SeeqpodApp on line 35) is a variable called _post_url. This value could be changed on the fly to return different results from the seeqpod's Rest API and get back videos or anything else they offer. Adding in video support would require a separate video player. When an item is loaded it could be checked to see if it was a video or an mp3 and pass the url off to the correct player.
Bugs
As of now I have 4 outstanding bugs I was unable to resolve before uploading the demo.
1) Error #2025: The supplied DisplayObject must be a child of the caller. I have a general idea of where this is being generated and the cause of it but I would have to rewrite specific load code inside of my AlbumArtDisplay class. This bug is sporadic and happens when switching from one album to another. When the AlbumArtDisplay redraws it sometimes throws this error. It causes the display to not complete update.
2) Play controls sometimes looses reference to Sound variable. This happens when a song is played and the next song selected could not be loaded. I have also seen this when you pause a song, then play another song. The fix is relatively simple but I was unable to add in all of the checks to make sure the play button is in the right state on each song load as well as enforce the connection with the playing song value. The play button was added as a simple proof of concept to show how songs could be controlled.
3) Animation cuts off abruptly. This is caused when the user rolls over the "minimized" playlist tray to quickly after a song has be loaded. There is a kill all tweens command on the mouse roll over event that fires to quickly. This can be solved by hooking into the album "open" and "close" event system to lock any user interaction until after the AlbumArtDisplay class has fully loaded and stopped animating.
4) Amazon Album Art fetches is not as accurate as it should be. There is no check that makes sure the album image matches 100% with the currently playing album. Right now the code assumes that the first album returned is correct.
Credits
Please be responsible with this code. If you decide to use parts of this code for your own projects please let me know. A lot of what I have learned came from others who have shared their code and I hope this helps you out in some way. Also it doesn't hurt to give me a plug at the following sites or send me an email at jessefreeman [at] gmail :