AJAX + Flash = dynamic playlist music player

directory listing and talking to flash

Alright, i pretty much finished my site.

Its built with an AJAX driven directory listing.  I then use flash External interface to tell flash to add a song to the playlist.

All this is done without leaving the current page, no refreshing or anything.  This way, you can browse all music without the flash player reseting.

What I've done so far:

Created Template using Photoshop and lots of Alpha channels in pngs

Made template to work in html

Converted html site to php site

Created mysql login system

Created symlink (or whatever) on my linux based NAS that hosts the music (and website) so i could have it in the web directory and the windows share directory without moving anything

Created AJAX driven directory browsing, able to traverse backwords and forwards in directory structure

Created Flash music player that has playlist & basic controls

Created Flash external interface to talk to javascript

Setup javascript to send track name and location to flash to add it to the playlist

 

 

Heres a pick of it in action:

almost finished

 

Things to do next:

Add way to save and load the playlist, most likely xml, maybe php/javascript reads the xml and sends each track to flash.  This way i can have many different playlists.

Add current playing song external interface in flash to display in the div header bar

Add song progress

Add song buffer/load

Add volume control

Move site to my godaddy hosting, leave music on my NAS at home

 

Some problems i had:

Getting javascript to talk to flash -tried several dozen different variations, trial and error FTW

Getting Flash SOUND_COMPLETE event to work - the hard part was figuring out what does and doesnt work in ActionScript 3: Sound, SoundChannel

Recursive directory browsing - had trouble figuring out how to go backwards.  what would we do without string concatenation?

 

 

Will post source code if anyone wants.

19,691 views 1 replies
Reply #1 Top

Hi 

I was looking for this kind of script for more than 8 months for now, i found some source codes but when song is added to the pop up player, the flash player reloads or refreshes. I dont want this to happen.

I am happy that you are willing to provide the source code.

 

Please provide me the source code. If everything works well accordingly, I will give you something in return.