dim cookiestr '添加歌曲 function Insertsong(songstr) dim tstr ttstr=split(songstr,",") for i=lbound(ttstr) to ubound(ttstr) tstr=split(trim(ttstr(i)),"|") if tstr(0)<>"" then if instr(cookiestr,tstr(0) & "|" & tstr(1))>0 then else cookiestr=cookiestr+"#"+ttstr(i) end if end if next call InitList end function ' ' ' ' ' ' ' dim SongID dim serverurl dim RealInstalled '安装了Realplayer? dim PlayState '播放状态 dim AutoLoop '自动循环 dim TotalSongs '歌曲总数 dim Modified '清单改变 dim IsListDbclick '正常停止? dim Progress_Draging '拖动中? dim Clip_Length '播放长度 dim Play_Mode '播放模式'0:顺序;1:随机 dim Progress_Interval '播放进度刷新的Interval ID dim Progress_bar_len '进度指示条总长 const MaxVolume=10 const Dotlinestr="----------------------------------------" ' ' ' ' ' ' ' '初始化页面(列表和变量) sub Init if RealInstalled<>true then exit sub call Initvars call Initlist ' call Resetctl ' call InitVolume call play end sub '初始化变量 sub Initvars Play_Mode=0 end sub '初始化列表 sub InitList() dim selectedindex dim songarray dim html dim i,j dim tarr dim OptionStrLen dim tstr if totalsongs>0 then selectedindex=songitem.selectedindex html="" & vbcrlf playlist.innerHTML=html if TotalSongs=1 then songitem.selectedindex=0 else if selectedindex0 and PlayState<>4 then:IsListDbclick=true:real.dostop:end if dim var dim person,collect,song,url var=split(songitem.options(songitem.selectedindex).value,"|") ' url=SVIP&var(0)&uus url=SVIP&var(0) song=var(1) collect=var(2) person=var(3) SongID=var(4) on error resume next if lenb(collect)>14 then info_collect.innerHTML=leftb(collect,12)&"..." else info_collect.innerHTML=collect end if if lenb(song)>14 then info_song.innerHTML=leftb(song,12)&"..." else info_song.innerHTML=song end if if real.getPlaystate<>0 then IsListDbclick=true if left(song,4)="[外部]" then real.setsource(url) else ' real.setsource(serverurl& trim(url)) real.setsource(trim(url)) end if info_url.innerHTML=serverurl& trim(url) SongTitle.innerHTML=song&" - "&collect OrderSongs.innerHTML="下载此首歌到手机 免费送歌送祝福 回首页" Lyricdata.location.href="http://www.99real.com/word/"&SongID&".htm" song_300.location.href="http://mmscode1.3bu.com/mmscode/MusicSingleRing/11141157006848837608.htm?songname="&song&"&a=&b=&c=&d=&e=&f=&webownerId=11598&serviceId=100001" song_468.location.href="http://www.91ivr.com/sendx26.html?seo=2037&musicname="&song&"" song_center.location.href="http://www.99real.com/99ad/song_center.htm" song_right.location.href="http://www.99real.com/99ad/130_310.htm" song_290.location.href="http://www.99real.com/99ad/290_40.htm" URLForm.URL.value="http://www.99real.com/play/"&SongID&".html" URLForm.SongsID.value=SongID on error resume next real.doPlay end sub ''' /* 1连接3播放0停止4暂停2缓冲 */ 'ActiveX控件的事件处理脚本 sub real_OnPlayStateChange(newstate) dim src dim converttext PlayState=newstate select case PlayState case 0 converttext="己停止" case 1 converttext="正在连接" case 2 converttext="缓冲数据" case 3 converttext="播放中" case 4 converttext="己暂停" case else converttext="未知错误" end select end sub '同上 sub real_OnClipOpened(clipname,clipurl) ' Clip_Playing=true Clip_Length=real.GetLength ' Progress_Interval=setInterval ("call Progress_Change",1000) '开始移动指示条 end sub '同上 sub real_onClipClosed dim Rndnum Rndnum=songitem.selectedindex clearInterval Progress_Interval '停止移动指示条 ' Clip_Playing=false dim i if IsListDbclick<>true then i=songitem.selectedindex if Play_Mode=0 then if i0 and songitem.selectedindex=0 and songitem.selectedindex0 then src=replace(src,"1.gif","2.gif") else src=replace(src,"2.gif","1.gif") end if ctl_loop.src=src end sub function getleft(str,length) dim ret dim i,j dim s i=1:j=1 while j96 and chr(s)<123) or (chr(s)>64 and chr(s)<91) then ' isalpha=true ' else isalpha=false ' end if end function