var movie,timer,step,total,state=null,delay=100
function init()
{
movie=window.document.movie
total=movie.TotalFrames
step=total/100|0
buttonState(false)
timer=setInterval("showStatus()",delay)
window.setTimeout("Play();",2000)
}
function Rewind(){
movie.Rewind()
}
function Back(){
if(movie.FrameNum!=0&&state!="forward"){
state="back"
Quick()
setTimeout("Back()",delay)
}
else state=null
}
function Play(){
movie.Play();
}
function Pause(){
with(movie)IsPlaying()?StopPlay():Play()
}
function Stop(){
movie.StopPlay()
}
function Forward(){
if(movie.FrameNum!=total-1&&state!="back"){
state="forward"
Quick()
setTimeout("Forward()",delay)
}
else state=null
}
function GoToEnd(){
movie.GoToFrame(total-1)
}
function Replay(){
Rewind()
Play()
setTimeout("Play()",delay*5)
}
function showStatus(){
var N=movie.FrameNum+1
bar.style.width=Math.round(N*100/total)+"%"
frameCount.innerText="下載完成,如未播放請點擊下方或Flash中的播放按鈕進行播放 當前播放幀數: " +N+"/"+total
}
function Quick(){
var targetFrame=movie.FrameNum+step*{back:-1,forward:1}[state]
movie.GoToFrame(targetFrame)
}
function selectMovie(){
document.getElementById("moviefile").click()
}
function buttonState(de){
var buttons=ctlButtons.document.all.tags("BUTTON")
for(var i=0;i
上一篇:JSP 試題集
下一篇:單點登入SSO技術資料收集