• piMP3 player | REMiX!

    So, i needed a light weight mp3 player for iamcell.com, when i stumbled upon the piMP3 Player by cssrevolt.com.  Perfect! (does not work in IE right now)…Uses prototype (less than perfect) and integrates seemingly seemless!  For the sake of UI, i added “previous” and “next track” buttons… Code can be seen below…  I worked under a stressful time constraint, so if any1 wants to jump in and drop some logic on my ass or fix the ie bug, by all means!

    _____________________________________________________

    download piMP3 player REMiX!

    next: function(e) {

    var counter = this.options.Counter++;
    var theCount = data.length;
    //alert(counter+'  |   |  ' + theCount);
    var sound = new Array();
    for(i = 0; i < theCount; i++){
    var ur = $('nextSound'+i);
    sound.push(ur);
    var cap = $('nextSound'+i).innerText;
    }
    if(counter==theCount){
    this.options.Counter=0;
    this.caption = sound[0].innerText || sound[0].textContent;
    this.sound_selected.writeAttribute('href',sound[0]).update(this.caption);
    } else {
    this.caption = sound[counter].innerText || sound[counter].textContent;
    this.sound_selected.writeAttribute('href',sound[counter]).update(this.caption);
    }

    Sound.play(this.sound_selected.readAttribute(‘href’),{track:’pimp3Player’, replace:true});
    this.sound_status.show();
    Event.stop(e);
    },

    prev: function(e) {

    var counter = this.options.Counter–;
    var theCount = data.length;
    //alert(counter);
    var sound = new Array();
    for(i = 0; i < theCount; i++){
    var ur = $(‘nextSound’+i);
    sound.push(ur);
    var cap = $(‘nextSound’+i).innerText;
    }
    if(counter==0){
    this.options.Counter=theCount-1;
    this.caption = sound[theCount].innerText || sound[theCount].textContent;
    this.sound_selected.writeAttribute(‘href’,sound[theCount]).update(this.caption);
    } else {
    this.caption = sound[counter].innerText || sound[counter].textContent;
    this.sound_selected.writeAttribute(‘href’,sound[counter]).update(this.caption);
    }
    this.caption = sound[counter].innerText || sound[counter].textContent;
    this.sound_selected.writeAttribute(‘href’,sound[counter]).update(this.caption);
    Sound.play(this.sound_selected.readAttribute(‘href’),{track:’pimp3Player’, replace:true});
    this.sound_status.show();
    Event.stop(e);
    }

     worldthreat No comments

    Leave a reply







Shout Outs!

highly recommended brethren...

  • Electric Sheep
  • i am cell
  • mlebrun.com
  • rob o’toole – the flexiest man alive
  • ryantgraff.com