home *** CD-ROM | disk | FTP | other *** search
- on testSndDelay soundFile, officialTime, optionSwitch
- global gSoundPath, gSoundDelay
- set sndChannel to 4
- if optionSwitch = #quietly then
- set the volume of sound sndChannel to 0
- else
- set the volume of sound sndChannel to 255
- end if
- set startTime to the ticks
- sound playFile sndChannel, soundFile
- repeat while soundBusy(sndChannel)
- end repeat
- set stopTime to the ticks
- set elapsed to stopTime - startTime
- put " elapsed = " & elapsed
- set gSoundDelay to min(30, elapsed - officialTime)
- put " new gSoundDelay = " & gSoundDelay
- puppetSound(sndChannel, 0)
- sound stop sndChannel
- end
-
- on toggleTransitions qualityDesired
- global gStopTransitions, oPuppeteer, gTransQuality
- set gTransQuality to qualityDesired
- if qualityDesired = #None then
- set gStopTransitions to 1
- else
- set gStopTransitions to 0
- end if
- if qualityDesired = #Better then
- setProp(the lsMachineProfile of oPuppeteer, #transitions, [#turnRight: "02,1,16,TRUE", #turnLeft: "01,1,16,TRUE", #forward: "09,1,8,TRUE", #lookAt: "09,1,8,TRUE", #backOff: "10,1,8,TRUE", #lookUp: "03,1,16,TRUE", #lookDown: "04,1,16,TRUE", #fadeIn: "50,2,8,TRUE", #slowMontage: "50,3,8,TRUE", #nextPage: "2,2,32,TRUE", #prevPage: "1,2,32,TRUE"])
- end if
- if qualityDesired = #Best then
- setProp(the lsMachineProfile of oPuppeteer, #transitions, [#turnRight: "02,1,16,TRUE", #turnLeft: "01,1,16,TRUE", #forward: "26,2,0,TRUE", #lookAt: "26,2,0,TRUE", #backOff: "26,2,0,TRUE", #lookUp: "03,1,16,TRUE", #lookDown: "04,1,16,TRUE", #fadeIn: "26,2,0,TRUE", #slowMontage: "26,3,0,TRUE", #nextPage: "2,2,16,TRUE", #prevPage: "1,2,16,TRUE"])
- end if
- end
-