Make your music flash application

Hi guy, I have some question,

Please check out this two site.

http://www.samsung.com/sg/mix/
http://chill.coca-cola.com/

My question is how this is done? Both in the front end and back end.

How does the system recognize which music to play when the timeline hit in the front end.

And how does the backend compile the DIY music file for the user to download. It just so dynamic.

Any idea how this can be done?

Thanks
Chup