global lastScoreSprite, oStoryteller, gSoundPath, gOriginPoint, gSndStart, gSoundDelay
if queuedSound <> #None then
soundEffect(queuedSound)
updateStage()
set queuedSound to #None
set sndFlag to 1
else
set sndFlag to 0
end if
set useLocalBeds to #on
set lsLiveHotspots to []
REPORT(">>> 'updateDisplay()' started ( " & the timer & " ticks )")
if listp(lsEarshot) then
if count(lsEarshot) then
if getState(oStoryteller, #currentDomain) = "ROXY" then
set houseHumVol to getAt(lsEarshot, 1)
if houseHumVol > 0 then
setLoop(#houseHum, houseHumVol)
else
endLoop(#houseHum)
end if
set phoneVol to getAt(lsEarshot, 2)
if (getState(oStoryteller, #ghostlyPhoneCall) = #ringingNow) and (phoneVol <> 0) then
setLoop(#phoneRinging, phoneVol)
end if
if getState(oStoryteller, #AMBERVISION) = #on then
playDomainEntrySound()
end if
end if
end if
end if
repeat with i in lsOnstage
if evaluate(oStoryteller, getProp(i, #showIF)) then
set assignedCast to getProp(i, #castNum)
if not integerp(assignedCast) then
set triggerVar to getAt(assignedCast, 1)
set frameStack to getaProp(lsMultiframes, getAt(assignedCast, 2))
if voidp(frameStack) then
alert("Whoa, grabbed a void from lsMultiframes, trying to get: " & getAt(assignedCast, 2))
exit
end if
if triggerVar = #AMBERVISION then
if getState(oStoryteller, #AMBERVISION) <> #on then
set assignedCast to getaProp(frameStack, #off)
else
set assignedCast to getaProp(frameStack, getState(oStoryteller, triggerVar))
end if
else
set assignedCast to getaProp(frameStack, getState(oStoryteller, triggerVar))
end if
if voidp(assignedCast) then
alert("Whoa, grabbed a void from the framestack, trying to get prop ' " & getState(oStoryteller, triggerVar) & "' from the state-var '#" & triggerVar & "'")
exit
end if
end if
append(purgeList, assignedCast)
if integerp(getProp(i, #channel)) or (getProp(i, #channel) = #shared) then
if getProp(i, #channel) <> #shared then
set sharedSprite to lastScoreSprite + getProp(i, #channel)
end if
puppetSprite(sharedSprite, 1)
set the castNum of sprite sharedSprite to assignedCast
set the ink of sprite sharedSprite to getProp(i, #ink)
set the loc of sprite sharedSprite to getProp(i, #coords) + gOriginPoint
else
if (getProp(i, #channel) = #sound) and (useLocalBeds = #on) then
set sndVolume to getProp(i, #earShot)
if sndVolume < 0 then
endLoop(value(getProp(i, #castName)))
else
setLoop(value(getProp(i, #castName)), sndVolume)
end if
end if
if getProp(i, #channel) = #video then
set videoSprite to 44
if the castNum of sprite videoSprite = 7 then
puppetSprite(videoSprite, 1)
set the castNum of sprite videoSprite to assignedCast
set vidCoords to getProp(i, #coords) + gOriginPoint
if optionSwitch = #fastVideo then
set the loc of sprite videoSprite to vidCoords
else
set the video of member assignedCast to 0
end if
end if
end if
end if
next repeat
end if
if integerp(getProp(i, #channel)) then
set unwantedSprite to lastScoreSprite + getProp(i, #channel)
end if
set the castNum of sprite unwantedSprite to 6
set the loc of sprite unwantedSprite to point(320, -360) + gOriginPoint