Initiate AS from JavaScript / AJAX / PHP

I’m making a multimedia player for a website and I’m seeking some help. Here’s my scenario:

  • simple multimedia player in Flash with AS 2.0 code
  • PHP page that retrieves file information from mySQL database
  • Javascript that displays the info from the database and upon selecting a song, should invoke the Flash player to start playing that song

I do not want the list of songs (collected from the database) to be part of the Flash interface – the Flash ONLY should include playing/pausing the music, nothing else.

I know how to program the multimedia player and know the PHP/mySQL to get the information. However, what I don’t know how to do is invoke the Flash to start playing from Javascript. Basically, I need Javascript to send a message to Flash (without reloading the page) that says, “hey, start playing song.mp3 now!”