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/generatorthen 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>
 


On Monday, October 1, 2012 10:47:28 AM UTC-4, Misterhee wrote:
>
> SWFObject is compatible with all AS1/2/3 based swfs (in does not know or 
> care about the internals of the swf in fact)
>
> Perhaps if you explain the issue in a bit more detail (and post a link of 
> possible), people can help.
>
>
> Cheers,
> Aran
>
> On Sun, Sep 30, 2012 at 11:41 PM, David Smith 
> <[email protected]<javascript:>
> > wrote:
>
>> I'm having trouble getting the playlist to load with xspfplayer.swf (a 
>> well known open source flash music player). I got it to run the callback 
>> function and other parameters, so I'm thinking that there's hope to get it 
>> working...
>>
>>  

-- 


Reply via email to