Inline Flash Mp3 Player

Subscribe to Inline Flash Mp3 Player 3 posts, 2 voices

 
simon! Scriptwright

the script http://userscripts.org/scripts/show/9238

theaulddubliner wrote: "in order to avoid disruption to page elements, would it be possible to have this as an icon until mouseover or click - perhaps the icon from the button version ?"

any help?

 
Adrian Scriptwright

All you would have to do is change it so it loads the player onclick. You can do this by stripping out the load code and put it into a separate function.

Example:


// this is the only thing needed inside the for loop
page_links[i].addEventListener("onclick", loadPlayer, false);

// end for loop

function loadPlayer(event) {
  // change this line
  var url = "http://img235.imageshack.us/img235/9199/mediaplayerqv0.swf?&file="+escape(this.href)+"&song_title="+escape(this.textContent);

  // load code goes here

  page_links[i].parentNode.insertBefore(span, this); // replaces the last line
  event.preventDefault();
}

And that's it!

 
simon! Scriptwright

sorry, I don't get it!? :'(

deeper explanation please!!!