mp3播放器组件
作者 佚名技术
来源 服务器技术
浏览
发布时间 2012-07-12
(ntime1/3600-0.5); m2=Math.round((ntime1-m1*60)/60-0.5); m3=ntime1-(m1*60+m2)*60; m4=m3-Math.round(m3/10-0.5)*10; m3=Math.round(m3/10-0.5); m5=ntime-ntime1*1000; m6=Math.round(m5/100-0.5); m7=Math.round((m5-m6*100)/10-0.5); m5=m5-m6*100-m7*10; if(ntype==0) { returnStr=new String(m1); returnStr=returnStr+m2+":"+m3+m4; returnStr=returnStr+m6+m7+m5; } else { if(m1==0) { returnStr=new String(m2); returnStr=returnStr+":"+m3+m4; } else { returnStr=new String(m1); returnStr=returnStr+m2+":"+m3+m4; } } //trace(m1+" "+m2); delete m1; delete m2; delete m3; delete m4; delete m5; delete m6; delete m7; delete ntype; delete ntime; delete ntime1; return returnStr; delete returnStr; } /////播放函数//////// function songPlay():Void { checkPause=0; this.onEnterFrame=function() { if(checkPause==1) { checkPause=0; timeSum=nSound.duration; if(timeSum>0) { nSound.start(); scanSong(); } else { errorShow(); delete this.onEnterFrame; } } checkPause=1; } } //////////歌曲播放完毕函数//////// nSound.onSoundComplete=function() { songOver(); } function songOver():Void { delete this.onEnterFrame; curTime=timeSum; this.perBar.stock._x=540; //判断歌曲是否到末尾 if(listNo loadSong(listNo+1); } else { loadSong(0); } } ///////歌曲播放出错函数////// function errorShow():Void { trace("error"); } /////////载入歌曲函数////////////// function loadSong(curSongPos:Number):Void { songUrl=listA[curSongPos]; listNo=curSongPos; nSound.loadSound(songUrl,true); songPlay(); delete curSongPos; } //添加歌曲地址到曲目列表函数/////// function addSongUrl(ssongUrl:String):Void { listA[listLen]=ssongUrl; listLen=listLen+1; delete ssongUrl; } //删除曲目列表中的歌曲地址函数////// function deleteSongUrl(ndelPos:Number):Void { var i:Number; if(ndelPos { for(i=ndelPos;i listA[i]=listA[i+1]; } listLen=listLen-1; //判断当前播放的歌曲位置变化 if(listNo>=ndelPos) listNo=listNo-1; } delete i; delete ndelPos; } reSetDeal(); stop(); 源代码 点击浏览该文件 关键词:组件 |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
上一篇: 动画基础:动画的灵魂-动作下一篇: 永不重合的小球,简单的Action
关于mp3播放器组件的所有评论