Re: [SWFObject] is swfobject compatible with Actionscript 2 swf files?

172 views
Skip to first unread message

Aran Rhee

unread,
Oct 1, 2012, 10:47:24 AM10/1/12
to swfo...@googlegroups.com
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 <djsmit...@yahoo.com> 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...

--
You received this message because you are subscribed to the Google Groups "SWFObject" group.
To view this discussion on the web visit https://groups.google.com/d/msg/swfobject/-/EHOXD8XDSewJ.
To post to this group, send email to swfo...@googlegroups.com.
To unsubscribe from this group, send email to swfobject+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.

David Smith

unread,
Oct 1, 2012, 12:03:28 PM10/1/12
to swfo...@googlegroups.com
   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>
Reply all
Reply to author
Forward
0 new messages