home *** CD-ROM | disk | FTP | other *** search
- on doPause nbTicks
- set stamp to the timer
- repeat while the timer < (stamp + nbTicks)
- end repeat
- end
-
- on copyList sourceList
- if not listp(sourceList) then
- return []
- end if
- return value(string(sourceList))
- end
-
- on updateFrameCounter
- global curFrame, kSliderSpr, kFrameCounterSpr
- set frameCounterSpr to 30
- puppetSprite(frameCounterSpr, 1)
- set the locH of sprite frameCounterSpr to the locH of sprite kSliderSpr - 14
- put string(curFrame) into field "frameCounter"
- end
-
- on updateShuttle
- global curFrame, scoreData, kSliderSpr, kShuttleBarSpr, frameCounterSpr
- set hOrg to the locH of sprite kShuttleBarSpr
- set range to float(the width of sprite kShuttleBarSpr)
- set nbFrames to count(scoreData)
- if nbFrames < 1 then
- set nbFrames to 1
- end if
- puppetSprite(kSliderSpr, 1)
- set step to range / nbFrames
- set dist to curFrame * step
- if (nbFrames = 1) or (curFrame = 1) then
- set dist to 0
- end if
- set sliderPos to hOrg + dist
- set the locH of sprite kSliderSpr to sliderPos
- set the locH of sprite frameCounterSpr to sliderPos - 14
- put string(curFrame) into field "frameCounter"
- end
-
- on formatField fieldName, font, size, style, color
- if the text of field fieldName = EMPTY then
- set the text of field fieldName to " "
- end if
- set the textFont of field fieldName to font
- set the textSize of field fieldName to size
- set the textStyle of field fieldName to style
- set the foreColor of cast fieldName to color
- end
-
- on preloadSounds
- global loopData, soundData
- repeat with curSound in soundData
- if curSound then
- preLoadCast(adjustCastNum(curSound))
- end if
- end repeat
- repeat with curSound in loopData
- if curSound then
- preLoadCast(adjustCastNum(curSound))
- end if
- end repeat
- end
-