You are not logged in.

  • »imvucodes« is a verified user
  • "imvucodes" started this thread

Posts: 130

Location: Interwebs

Occupation: Serving code snippets non stop.

  • Send private message

1

Monday, July 12th 2010, 2:36pm

Scrolling Musicbox (with controls)

This code will transform your music panel content into a scrollbox that automatically scrolls to the left. Additionally it contains two cotrolls (one at each end) to change the scrolling direction. This code has to be put after the music panel html box (that means it will not work when you put this code into the music panel!

this code is originally made by imvucodes. if you copy or share it please tell where u got it from. thx!

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<script type="text/javascript">
 var copiedfrom='www.imvucodes.net';
 function musicmarquee_by_imvucodes_net() {
  var getlinks=document.getElementById('music_panel_body').getElementsByTagName('td');
  var newcontent='<table style="width:100%"><tr><td style="width:20px"><img src="http://www.imvucodes.net/src/120186342989880.png" style="cursor:pointer" onclick="musicbox_changedirection(-1)" title="Musicbox-Scroller by IMVUCODES.NET!" alt="left" /></td><td><marquee direction="alternate" id="musicbox"><table><tr>';
  if(getlinks.length>0) {
   for(var i=0;i<getlinks.length;i++) {
    newcontent+='<td style="text-align:center">'+getlinks[i].innerHTML+'</td>';
  }
  newcontent+='</tr></table></marquee></td><td style="width:20px"><img src="http://www.imvucodes.net/src/12018634972160.png" style="cursor:pointer" onclick="musicbox_changedirection(1)" title="Musicbox-Scroller by IMVUCODES.NET!" alt="right" /></td></tr></table>';
  document.getElementById('music_panel_body').innerHTML=newcontent;
   document.getElementById('musicbox').start();
 }
}
function musicbox_changedirection(direction) {
var newdirection='left';
if(direction>0) newdirection='right';
document.getElementById('musicbox').direction=newdirection;
}
musicmarquee_by_imvucodes_net();
</script>

Similar threads

Rate this thread