home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global gBaseURL
- localInit()
- pass()
- end
-
- on getLoadID theMovie
- PreloadNetThing(theMovie)
- set CurrID to GetLatestNetID()
- return CurrID
- end
-
- on waitForTicks theTicks
- set startTime to the timer
- repeat while (startTime + theTicks) > the timer
- nothing()
- end repeat
- end
-
- on goMovie theMovie
- global gPreloadingOn, gCurrLoading, gLoadStatus, gBaseURL, gReadyToGo
- if not (theMovie contains ".dcr") then
- set theMovie to theMovie & ".dcr"
- end if
- set gReadyToGo to 1
- GoToNetMovie(theMovie)
- fadeAllSounds(200)
- end
-
- on goPage thePage, frameSet
- global gPreloadingOn, gCurrLoading, gLoadStatus, gReadyToGo, gBaseURL
- set gReadyToGo to 1
- if not frameSet then
- goToNetPage(thePage)
- fadeAllSounds(200)
- else
- goToNetPage(thePage, frameSet)
- end if
- end
-
- on idle
- global cgiFlag, gCGIResult
- if cgiFlag = 1 then
- set gCGIResult to checkCGI()
- end if
- end
-
- on getFileName theURL
- repeat with i = the number of chars in theURL down to 1
- if (char i of theURL = "/") or (char i of theURL = ":") then
- set rVal to char i + 1 to the number of chars in theURL of theURL
- exit repeat
- end if
- end repeat
- return rVal
- end
-
- on getCurrLabel
- set lastLine to the number of lines in the labelList - 1
- repeat with i = 1 to lastLine
- if the frame < label(line i of the labelList) then
- if i > 1 then
- return line i - 1 of the labelList
- else
- return EMPTY
- end if
- exit
- end if
- end repeat
- return line lastLine of the labelList
- end
-
- on goCookiePage thePage
- global cgiFlag, gReadyToGo
- put thePage
- if not cgiFlag then
- getNetText("http://www.dxm.com/cgi/cookie_set.cgi?cookieName=nextPage;cookieValue=" & thePage)
- set cgiFlag to 1
- set gReadyToGo to 1
- end if
- end
-
- on checkCGI
- global cgiFlag, gReadyToGo
- if cgiFlag = 1 then
- if NetDone() = 1 then
- set cgiFlag to 0
- set gReadyToGo to 0
- return NetTextResult()
- exit
- end if
- end if
- return 0
- end
-
- on fadeAllSounds fadeDuration
- if soundBusy(1) or soundBusy(2) then
- set lPlaying to 1
- end if
- if soundBusy(1) then
- sound fadeOut 1, fadeDuration
- end if
- if soundBusy(2) then
- sound fadeOut 2, fadeDuration
- end if
- if lPlaying then
- waitForTicks(fadeDuration)
- end if
- end
-