home *** CD-ROM | disk | FTP | other *** search
- global gSWAflag, gTimeBarSprite, gSWAFile, gSWAStatus
-
- on startMovie
- global gButtonFamily
- set gButtonFamily to ["result", "script"]
- set gSWAFile to the text of field "argument"
- set gTimeBarSprite to 14
- soundConfig("SWAHolder", gSWAFile)
- end
-
- on idle
- if gSWAflag = 1 then
- checkSWA("SWAholder")
- end if
- end
-
- on stopMovie
- end
-
- on soundConfig membername, SWAfile
- if not (the movieName contains ".dcr") then
- exit
- end if
- set the URL of member membername to SWAfile
- set the preLoadTime of member membername to 5
- PreLoadBuffer(member membername)
- set gSWAflag to 1
- end
-
- on checkSWA membername
- set gSWAStatus to the state of member membername
- if gSWAStatus = 2 then
- else
- if gSWAStatus = 3 then
- updateTimeBar(the percentPlayed of member membername)
- else
- if gSWAStatus = 5 then
- updateTimeBar(100)
- set gSWAflag to 0
- else
- if gSWAStatus = 9 then
- set errorCode to GetError(member membername)
- set errorString to GetErrorString(member membername)
- debug(errorCode, errorString)
- set gSWAflag to 0
- end if
- end if
- end if
- end if
- end
-
- on buttonMan
- global gButtonFamily
- set cName to the name of member the memberNum of sprite the clickOn
- put cName
- repeat with i in gButtonFamily
- if i = cName then
- go(label(i))
- exit
- end if
- end repeat
- updateStage()
- end
-
- on updateTimeBar value
- if not (the puppet of sprite gTimeBarSprite) then
- puppetSprite(gTimeBarSprite, 1)
- end if
- set the width of sprite gTimeBarSprite to value
- updateStage()
- end
-
- on debug message
- put message into field "results"
- end
-