PDA

View Full Version : Controlling MP3 Playback using JavaScript


fanderson
11-03-2008, 01:03 PM
I have an AS3 MP3 player on a web page that uses the ExternalInterface.addCallback() method to playback mp3 files. The xml is generated dynamically and loads properly. I am able to toggle through the songs and play them from the MP3 player, however my efforts to communicate with the MP3 player from the web page are not working properly.

I am using swfObject to embed the swf movie on the page and the following code to trigger the playback from the page:


<a href="#" onclick="swfobject.getObjectById('mp3_player').playSong({en try_id},0);">


I could use some guidance on making this connection work properly. Any suggestions?

Thanks