It works now. The only problem now is that it fires the callback function even when the script has been blocked by flashblock, so now I'm looking at the ExternalInterface example (
http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test_dynamic_com.html) for help on that.
Here is the code that worked in case it is useful to someone else (I autogenerated it with the
http://code.google.com/p/swfobject/wiki/generator then tested with the various variations of writing parameters until it worked. If you don't have an animation you're trying to sync with, it should work fine w/ your xspfplayer too. It reads the playlist fine too. If you test this and have problems with the playlist, use the full url, not relative path):
This code can be inserted anywhere in your HTML page AFAIK:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="/swfobject/swfobject.js"></script>
<script type="text/javascript">
function loadanigif() {
document.getElementById("Picture1").src="/assets/images/test.gif";
}
var flashvars = {};
flashvars.playlist_url="/samples/playlist.xspf&autoplay=true&autostart=true"
var params = {};
params.info_button_text="Info";
params.bgcolor = "eeeeee";
params.allowscriptaccess = "sameDomain";
var attributes = {};
attributes.id = "xspfplayer";
attributes.align = "top";
swfobject.embedSWF("/xspfplayer/xspf_player_slim.swf", "AltContent", "250", "17", "7.0.0", "/swfobject/expressInstall.swf", flashvars, params, attributes, loadanigif);
</script>
</head>
<body>
<div id="AltContent">
<a href="
http://www.adobe.com/go/getflashplayer">
<img src="
http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player">
</a>
</div>
</body>
</html>