Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormista3
    • CommentTimeOct 6th 2006
     permalink
    So, I'm told you can use SWF object to serve say, a Flash 8 swf to those who have the required player, but a Flash 6 swf to everyone else....

    Something like...

    if (flash 8) {
    swf = "flash8.swf";
    } else {
    swf = "flash6.swf";
    }

    new swfobject(swf, "myswf", ...

    Can anyone help me write this properly... I'm a bit stuck!

    Cheers,

    James
    •  
      CommentAuthorJohnRiv
    • CommentTimeOct 6th 2006
     permalink
    here's the general idea:

    var flashVersion = deconcept.SWFObjectUtil.getPlayerVersion();
    var swf = "flash6.swf";
    var minVersion = "6";
    if(flashVersion['major'] >= 8) {
    swf = "flash8.swf";
    var minVersion = "8";
    }
    var so = new SWFObject(swf, "myswf", "300", "300", minVersion, "#ffffff");
    so.write("flashcontent");
    • CommentAuthormista3
    • CommentTimeOct 9th 2006 edited
     permalink
    Thanks John! I should really know this as it's now far off actionscript, but wanted to check anyhow :)
    • CommentAuthormista3
    • CommentTimeOct 10th 2006 edited
     permalink
    Hmm, John's code doesn't seem to be working - I don't think the swf and minVersion variables are working... well at least they are not being replaced with an actual value... and the swf is not showing...

    <script type="text/javascript">
    // <![CDATA[
    var flashVersion = deconcept.SWFObjectUtil.getPlayerVersion();
    var swf = "myswf_v6.swf";
    var minVersion = "6";
    if(flashVersion['major'] >= 8) {
    swf = "myswf.swf";
    var minVersion = "8";
    }

    var fo = new FlashObject(swf, "flashlayer", "912", "540", minVersion, "#000000");
    fo.write("content");
    // ]]>
    </script>
    • CommentAuthormista3
    • CommentTimeOct 10th 2006 edited
     permalink
    EDIT. This was a stupid comment so have deleted it.
Add your comments
    Username Password
  • Format comments as (Help)