views:

65

answers:

1

Hi, i'm assigning new playlist to the SWF object. Then it needs to be reloaded it with new param:

sections.change(function(){

    var current = $(this).val();
    var fextention = ".xml";

    //show the loading bar
    showLoading();

    //reloading player with relevant playlist:
    xmlplaylist.val("xml=playlists/"+current+fextention);

    var elem = $("#dewplayerpls")[0]; // - #dewplayerpls - is object id
    elem.reload();
    window.alert( xmlplaylist.val() ); // value correct. reload doesn't happen

}

A: 

Ok, i work it out.... sharing the knowledge.

you need to use swfobject.js plugin (http://jquery.thewikies.com/swfobject/)

then the code is simple:

var xmlplaylist = 'dewplayer-playlist.swf?xml=playlists/'+current+fextention;
swfobject.embedSWF(xmlplaylist, 'player', '240', '200', '5.0.0');

where xmlplaylist - selfexplanatory (basically SWF file, and xml - is the parameter) player - is id to append it to 240 - width 200 - hight 5.0.0 - minimum flash player requirement more options available please read swfobject docs.

already forgot my login info while was waiting!