It can be done. The synchronization is probably never going to be perfect, but you can come close. You'll need some JavaScript to detect whether the images have all loaded (test each of the image's 'completed' property for true/false). That means you'll need to know how your slideshow script tracks the list of images it uses and create Image objects for each one with the same 'src' to pre-load them all. Your script might also need to load the MP3 file into an internal object so you can be sure it's fully loaded, too. Then you can use a DOM method to add the HTML code to your document to play the MP3 and start the slideshow's timer so they start at roughly the same time.
The exact code is going to depend on how the slideshow script works. You might not need to pre-load all of the images to get the effect you're after. If the slideshow runs slowly enough, pre-loading the first three or four images might give the browser enough of a head start that everything runs smoothly.
I don't work with media players very much, but I think you should look into some more cross-browser compatible code than a simple <embed> tag. Good luck!
Rick Trethewey
Rainbo Design
Bookmarks