Not signed in (Sign In)

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

    • CommentAuthormikeebee
    • CommentTimeMar 5th 2008 edited
     
    Hi all, I'm using wimpyplayer to play an mp3 on a site and I want to bring it in using SWFObject I managed to get the player on the page but I'm having trouble getting it to pass the parameter that adds the skin to the player as its part of the embed tag, as well as the option to start playing on load.

    Basically this bit...

    src="http://www.xinghealth.co.uk/tunes/player.swf?wimpyApp=http://www.xinghealth.co.uk/tunes/player.php&wimpyskin=http://www.xinghealth.co.uk/tunes/skins/skin_simple_bar_new2.xml&popUpHelp=no&startPlayingOnload=yes"

    Here is the working version with the embed and Here my attempt at using SWFObject

    You can see its bringing in the default skin which I can only assume is embedded into the player.swf file.

    Any ideas?

    Many thanks
    • CommentAuthorphilip
    • CommentTimeMar 5th 2008
     
    both of your links point to the same page.

    as for using SWFObject, anything in your src code after "?" is a variable. variables are prefaced by the variable name, followed by an equal sign (=), then the value of the variable. when there's more than one variable, they're separated by an ampersand (&).

    src =
    http://www.xinghealth.co.uk/tunes/player.swf <-- location of SWF
    ?
    wimpyApp=http://www.xinghealth.co.uk/tunes/player.php <-- wimpyAmp variable
    &
    wimpyskin=http://www.xinghealth.co.uk/tunes/skins/skin_simple_bar_new2.xml <-- wimpyskin variable

    ... etc.

    SWFObject uses addVariable() to pass the variables to the SWF:

    var so = new SWFObject ...
    (add this line for each variable -->) so.addVariable("wimpyAmp", ""http://www.xinghealth.co.uk/tunes/player.php);
    so.write ...

    you can read more at http://blog.deconcept.com/swfobject/#howitworks

    - philip
    • CommentAuthorphilip
    • CommentTimeMar 5th 2008
     
    i see you updated the link. :)

    your code needs some tweaking. do the addVariable bit i suggested in my previous post, then make the following edits to your code:

    1. delete the following lines, they're not necessary (SWFObject will handle these automatically):
    so.addParam("quality", "high");
    so.addParam("bgcolor", "f6f6f6");
    2. fix the typo in so.addParam("menu", "flase");
    3. delete the line:
    so.addParam("movie", "http://www.xinghealth.co.uk/tunes/player.swf?wimpyApp=http://www.xinghealth.co.uk/tunes/player.php&wimpyskin=http://www.xinghealth.co.uk/tunes/skins/skin_simple_bar_new2.xml");
    4. delete so.write("flashcontent"); since your 'tunesholder' div is the target div
    5. move so.write("tunesholder"); to be the last item

    - philip
    • CommentAuthormikeebee
    • CommentTimeMar 5th 2008 edited
     
    Doh! Changed the link now, thanks for pointing out what were variables. I've added the lines that I think I need but its still showing the original skin. Would you mind having a look see if its all as it should be? (the link is now fixed)

    Just got your reply! I'll work through those!

    Thanks

    Mike
    • CommentAuthormikeebee
    • CommentTimeMar 5th 2008
     
    Thats got the skin working great but now the music isn't playing : /
    • CommentAuthorphilip
    • CommentTimeMar 5th 2008
     
    you have this line twice:
    so.write("tunesholder");

    delete the first one, you should only have one, and it should be the last thing in your list SWFObject code.
    • CommentAuthormikeebee
    • CommentTimeMar 5th 2008
     
    Thats got the sucker! Thank you so much, you have been so helpful.

    Thanks again

    Mike