Mends Music Player

Software Photoshop iconFlash iconFlash Develop icon
Mends Music Player thumbnail

It's been years since I've had to build a music player, but ever since Adobe came out with compute spectrum I've wanted to try messing around with one again. Alas nothing ever came up that afforded me the opportunity to give it a go.

That is until I made the opportunity myself. While building myMends I knew that at some point I was going to have to either come up with a way to link to music or build a player that could play it on it's own. Obviously I went with the latter and this is what I came up with.

If you check out the link to the player at the very top you'll see it only plays one song and the top two control buttons are missing. But in the player above you'll see they are there and that they control going to the 'next' or 'previous' song. Also, a little counter-intuitive, but the eject button displays the visualizations and doesn't actually stop the song. I figured since I was doing something pretty different here I'd go against the norms in this case.

Besides the visualizations, my favorite thing is that the tape reels actually rewind and play in accordance to the location of the play head. That was something I worked a while on, and it's an effect I'm very proud of.


User controls: (from top right)

  • Previous Song
  • Next Song
  • Play/Pause
  • Turn on/off Visualizations
  • Volume : Grab and move up or down to spin the wheel.

User controls: (on the cassette, from top down)

  • Artist/Song name : If you mouse over this area and the name is truncated, the title will scroll from side to side so you can view the whole thing.
  • Song List : If there's an .xml file of songs the Previous & Next song buttons will appear. Also a tab underneath the Title will appear. If you click on this title, a list will drop down, and if it's a long list a scrollbar will be added. You can also mouse over the titles in this list, and if they are too long they will also scroll back and forth displaying the full title.
  • Play Head : Allows you to scrub back and forth through a song. You can also click anywhere on the track and the song will jump to that position.
  • Repeat On/Off : If on, it will rewind once it's played the last song in the list and start playing from the beginning.

All controls will be disabled until the song is completely loaded. Flash handles sound events oddly, so I found this to be the best solution for now.

Embedding variables :

  • song : String = "songname.mp3";
    • Used to embed just one song.
  • artist : String = "The Song Artists Name";
    • Required if embedding just one song
  • title : String = "The Song Title";
    • Required if embedding just one song
  • songs : String = "nameOfXmlFile.xml";
    • Used to embed a list of songs
    • This is the file used above, for example.
    • You can see that on the last node I overrode the default locale for the file by specifying a full URL.
  • volume : uint = 100;
    • Possible vals = 0-100(%)
  • autoPlay : Boolean = 0;
    • Possible vals = 0,1,true,false
    • 1 or true for on
  • repeat : Boolean = 0;
    • Possible vals = 0,1,true,false
    • 1 or true for on