'____________________________________________________________ 'coded by tel - tel@nazgul.net / http://tel.blistered.org 'Updated 31/07/2004 'Fixed bugs in GOTOLetter/Number which caused the track to stop playing, and only found Upper Case Letters 'Added Pause, Volume, Time, Current Track Details 'Feel free to use, but please keep this info and about info '____________________________________________________________ Dim StrA(19), strB(19), strC(19), strLen, StrToAdd, x, Song, Last, iPause, sPause 'StrA,B,C - change value (0) to the amount of songs in your list -1 'StrA = The initial list of songs 'StrB = song path 'StrC = song title 'this code uses # as a delimiter the list format it strA() = songtitle/delimiter/path: StrA(0) = "split infinity radio#http://70.84.35.210:8000" StrA(1) = "triple xxx radio#http://dream.wavestreamer.com:2248" StrA(2) = "vocal trance (low quality)#http://digitallyimported.com/wma/vocaltrance_low.asx" StrA(3) = "trance (low quality)#http://digitallyimported.com/wma/trance_low.asx" StrA(4) = "hard trance (low quality)#http://digitallyimported.com/wma/hardtrance_low.asx" StrA(5) = "progressive trance (low quality)#http://digitallyimported.com/wma/progressive_low.asx" StrA(6) = "eurodance (low quality)#http://digitallyimported.com/wma/eurodance_low.asx" StrA(7) = "dj mixes(low quality)#http://digitallyimported.com/wma/djmixes_low.asx" StrA(8) = "chillout (low quality)#http://digitallyimported.com/wma/chillout_low.asx" StrA(9) = "goa trance (low quality)#http://digitallyimported.com/wma/goapsy_low.asx" StrA(10) = "deep house (low quality)#http://digitallyimported.com/wma/deephouse_low.asx" StrA(11) = "hard house (low quality)#http://digitallyimported.com/wma/hardhouse_low.asx" StrA(12) = "hardcore (low quality)#http://digitallyimported.com/wma/hardcore_low.asx" StrA(13) = "classic techno (low quality)#http://digitallyimported.com/wma/classictechno_low.asx" StrA(14) = "newage (low quality)#http://digitallyimported.com/wma/newage_low.asx" StrA(15) = "the 80's (low quality)#http://digitallyimported.com/wma/the80s_low.asx" StrA(16) = "smooth jazz (low quality)#http://digitallyimported.com/wma/smoothjazz_low.asx" StrA(17) = "top hits (low quality)#http://digitallyimported.com/wma/tophits_low.asx" StrA(18) = "70's hits (low quality)#http://digitallyimported.com/wma/hit70s_low.asx" StrA(19) = "jazz (low quality)#http://digitallyimported.com/wma/jazz_low.asx" '---------------------------------------------------------------------------------------------- Loadit StrA '---------------------------------------------------------------------------------------------- 'Parse the list, remove the delimiter and add the path and titles to seperate arrays Function Loadit(list) Dim Spl For x = 0 To UBound(StrA) Spl = Split(StrA(x), "#") strB(x) = Spl(0) strC(x) = Spl(1) Next End Function '------------------------------------------------------------------------------------------------ 'UPDATED' 'Write the List Boxes on the webpage document.write "

" '---------------------------------------------------------------------------------------------- Function Vol(vtype) 'NEW' 'pump up the volume Select Case vtype Case 0 If Player.settings.volume = 100 Then MsgBox "Volume Level is set to MAX!": Exit Function Player.settings.volume = Player.settings.volume + 2 volumelevel.Value = Player.settings.volume Case 1 If Player.settings.volume = 0 Then MsgBox "Volume Level is set to MIN!": Exit Function Player.settings.volume = Player.settings.volume - 2 volumelevel.Value = Player.settings.volume End Select End Function '---------------------------------------------------------------------------------------------- Function gotoLetter(Lett) 'UPDATED' 'Go to specific Letter For x = 0 To UBound(strC) If UCase(Mid(strC(x), 1, 1)) = Chr((65 + Lett)) Then jukebox.choon.Value = x Exit For End If Next Player.Controls.currentPosition = sPause Player.controls.play() End Function '---------------------------------------------------------------------------------------------- Function Numberizer(Num) 'UPDATED' 'Goto Specific Number: ''ie: 4 non blondes, 50 cent For x = 0 To UBound(strC) If Mid(strC(x), 1, 1) = Chr(Num + 48) Then jukebox.choon.Value = x Exit For End If Next Player.Controls.currentPosition = sPause Player.controls.play() End Function '---------------------------------------------------------------------------------------------- Function search(strg) 'UPDATED' 'search the list for a certain song/artist ''this example has the number of search chr's set to 4 and above For x = 0 To UBound(strC) If InStr(1, strC(x), strg, vbTextCompare) <> 0 And Last <> x Then jukebox.choon.Value = x Last = x Result = True Exit For End If Next If Result = False Then MsgBox "No Results =[" End Function '---------------------------------------------------------------------------------------------- Sub chg() 'on select change, get the index of the combo box Song = Int(jukebox.choon.Value) End Sub '---------------------------------------------------------------------------------------------- 'Handle a DoubleClick on the Song List Sub Doubled() 'NEW' chg() PlayerControl (0) End Sub '---------------------------------------------------------------------------------------------- Sub rand() Randomize 'play a random song RandNum = Int((UBound(strB)) * Rnd + 1) jukebox.choon.Value = RandNum Player.URL = strB(RandNum) End Sub '---------------------------------------------------------------------------------------------- Function Moot(Dirc) 'page up/down If jukebox.choon.Value = "" Then jukebox.choon.Value = 0 On Error Resume Next Select Case Dirc Case 1 jukebox.choon.Value = jukebox.choon.Value - 6 'set this to the size of the list Case 2 jukebox.choon.Value = jukebox.choon.Value + 6 'set this to the size of the list End Select End Function '---------------------------------------------------------------------------------------------- 'UPDATED' 'player controls Function PlayerControl(Cont) Select Case Cont Case 0 Dim First, Last, Temp, tString Player.URL = strC(Song) Temp = strB(jukebox.choon.Value) CurrentArtist.Value = "Current Stream: " & Temp CurrentArtist.Size = Len(CurrentArtist.Value) iPause = 0 Case 1 Player.controls.stop() Case 2 If btnPause.Value = "Pause" Then Player.Controls.Pause() iPause = Player.Controls.currentPosition btnPause.Value = "Un Pause" Else btnPause.Value = "Pause" Player.Controls.currentPosition = iPause Player.controls.play() End If End Select End Function '---------------------------------------------------------------------------------------------- Sub About() MsgBox "VBS Jukebox SE:Whats New?" & vbCrLf & vbCrLf & "Volume Control, Current Track Details, Double Click Songs in list to play, Pause added, Search and GoTo letter/number Fixed" & vbCrLf & vbCrLf & "Coded by tel: tel@nazgul.net", 64, "VBS Jukebox SE Info" End Sub 'UPDATED' 'add A B C D E ... Z and 0 - 9 links, used to navigate by 1st chr's of song name document.write "


Jump To Letter (sorted by artist)
" For x = 0 To 25 document.write " " & Chr(x + 65) & " " Next document.write "
" For Y = 0 To 9 document.write " " & Chr(Y + 48) & " " Next