I have coded a JUKEBOX. The current artist, title, and time remaining are scrolling across the title bar. I would like to add a next, previous and pause button to the title bar so the user can control the jukebox without maximize or restoring the minimized window. Is this possible?.
An example would be what media player does when minimized.
My title bar marquee works OK but could scroll a bit smoother. Actually, I want it to bounce back and fourth slowly.
Here is the marquee code
Function VBScroll_Title
document.title=vbtxt
vbtxt=mid(vbtxt, 2, len(vbtxt) - 1) & left(vbtxt, 1)
refresh=setTimeout("VBscroll_title()",VBspeed)
End function
and the title bar function
Function TitleBar()
Dim MediaAttributes(4)
MediaAttributes(1) = "Title"
MediaAttributes(2) = "Artist"
MediaAttributes(3) = "Album"
MediaAttributes(4) = "Duration"
Dim Title, Artist, Album, Duration, Remaining
Title = mediaPlayer1.currentMedia.getItemInfobyAtom(mediaPlayer1.mediaCollection.getMediaAtom(MediaAttributes(1)))
Artist = mediaPlayer1.currentMedia.getItemInfobyAtom(mediaPlayer1.mediaCollection.getMediaAtom(MediaAttributes(2)))
Album = mediaPlayer1.currentMedia.getItemInfobyAtom(mediaPlayer1.mediaCollection.getMediaAtom(MediaAttributes(3)))
Duration = mediaPlayer1.currentMedia.getItemInfobyAtom(mediaPlayer1.mediaCollection.getMediaAtom(MediaAttributes(4)))
Remaining = Math.floor(mediaPlayer1.currentMedia.duration - mediaPlayer1.controls.currentPosition)
dim count, m, s, n, o
m = int(Remaining / 60)
if m > 59 then
m = int(m / 60)
n = Split(m,".")
o = n(1)
if o < 10 then o = 0&o
m = n(0)&":"&o
end if
s = Remaining - (int(Remaining / 60) * 60)
n = Split(s,".")
s = n(0)
if s < 10 then
s = 0&s
end if
Remaining = m&":"&s
'Dim VBtxt, VBspeed, VBrefresh
VBtxt = Title & " - " & Artist & " - " & Remaining & " "
VBspeed=1000
VBrefresh=null
VBscroll_title()
End Function