home *** CD-ROM | disk | FTP | other *** search
- global tick, shockTime, beeps, bignil, smallnil, amloc, sMode, stopwatchpause, day1
-
- on startMovie
- doInit()
- end
-
- on doInit
- castInit()
- timeInit()
- dateInit()
- alarmInit()
- timerInit()
- stopwatchInit()
- timezoneInit()
- end
-
- on castInit
- set bignil to the number of cast "Big Nil"
- set smallnil to the number of cast "Small Nil"
- set amloc to the number of cast "AM"
- set sMode to 9
- set day1 to the number of cast "SU"
- end
-
- on upkeep
- getTheTime()
- set x to the result
- if the second of shockTime <> the second of x then
- set shockTime to x
- set tick to 1
- checkAlarm()
- checkTimer()
- indicatealarm()
- if beeps then
- beep()
- set beeps to beeps - 1
- end if
- end if
- end
-
- on gonext
- set tick to 1
- puppetrange(1, 44, 0)
- if the frameLabel <> "timezone" then
- go(#next)
- else
- go("clock")
- end if
- puppetrange(1, 44, 1)
- set x to the frameLabel
- if x = "alarm" then
- alarm()
- end if
- if x = "stopwatch" then
- set the castNum of sprite sMode to the number of cast "stopwatch" + stopwatchpause
- end if
- if x = "timezone" then
- tzDisplay()
- end if
- end
-
- on puppetrange x, y, val
- repeat with z = x to y
- set the puppet of sprite z to val
- end repeat
- end
-
- on donum start, nil, pad, val
- set the castNum of sprite start to nil + (val / 10) + (pad or (val / 10))
- set the castNum of sprite (start + 1) to nil + (val mod 10) + 1
- end
-