home *** CD-ROM | disk | FTP | other *** search
- on CheckCast
- repeat with i = 1 to 999
- if the depth of cast i > 8 then
- put "whoops! cast " && i && " > 8 bit!!"
- end if
- end repeat
- end
-
- on GetCaption
- global gCurChap, gCurArticle, gCaptions
- set the itemDelimiter to "@"
- set tmp to item gCurChap of gCaptions
- set the itemDelimiter to "#"
- set tmp to item gCurArticle of tmp
- set the itemDelimiter to ","
- delete line 1 of tmp
- set tmpchar to the number of chars in tmp
- if char tmpchar of tmp = RETURN then
- put "." into char tmpchar of tmp
- end if
- return tmp
- end
-
- on UnloadMem
- unLoad()
- put "unloaded memory from everything except current frame. free=" && the freeBytes / 1024
- end
-
- on CleanMem
- global gCurPic
- if gCurPic > 0 then
- unLoad(gCurPic)
- put "unloaded " && the name of cast gCurPic && " free=" && the freeBytes / 1024
- end if
- end
-
- on BlackScreen
- global gMakerNum, gWorld, gnuggets
- puppetSprite(47, 1)
- set the castNum of sprite 47 to the number of cast "blackbox"
- spriteBox(47, 0, 0, 640, 480)
- set gMakerNum to value(gMakerNum)
- set the text of field "strapline" to line gMakerNum of field "makersstraplines"
- set the itemDelimiter to ","
- delete item 1 of field "strapline"
- ReadScript()
- set the itemDelimiter to "."
- set gWorld to item 1 of the movieName
- set the itemDelimiter to ","
- set tmpnum to the number of lines in field ("LoadingLines" & gWorld)
- set the text of field "LoadingText" to line random(tmpnum) of field ("LoadingLines" & gWorld)
- puppetSprite(48, 1)
- set the castNum of sprite 48 to the number of cast "LoadingText"
- set the locH of sprite 48 to 100
- set the locV of sprite 48 to 150
- end
-
- on UnBlackScreen
- set the locH of sprite 47 to 2000
- set the locH of sprite 48 to 2000
- puppetSprite(48, 0)
- puppetSprite(47, 0)
- updateStage()
- end
-
- on ClickSnd
- global gClickSndCast
- puppetSound(2, gClickSndCast)
- TrapMouse()
- end
-
- on TrapMouse
- global gTrapStart
- puppetSprite(46, 1)
- set the castNum of sprite 46 to 1042
- spriteBox(46, 0, 0, 640, 480)
- updateStage()
- end
-
- on EndTrapMouse
- puppetSprite(46, 0)
- end
-
- on ButtonClick
- global gClickSndCast
- ClickSnd()
- updateStage()
- set me to the clickOn
- set myname to the name of cast the castNum of sprite me
- set the itemDelimiter to "."
- set myname to item 1 of myname
- set the itemDelimiter to ","
- puppetSprite(me, 1)
- set myname to myname & ".down"
- set the castNum of sprite me to the number of cast myname
- updateStage()
- puppetSprite(me, 0)
- end
-
- on GetMapCap
- global gMakerName, gMapCap, gCurMap
- set the itemDelimiter to "#"
- set num to the number of items in field "MapCaptions"
- set the itemDelimiter to ","
- set the text of field "caption-map" to " "
- repeat with i = 1 to num
- set the itemDelimiter to "#"
- set gMapCap to item i of field "MapCaptions"
- set the itemDelimiter to ","
- if word 1 of gMapCap = gMakerName then
- set gCurMap to 1
- GetNextMapCap()
- exit
- end if
- end repeat
- set gMapCap to " "
- end
-
- on GetNextMapCap
- global gCurMap, gMapCap
- set captionsprite to 18
- set captionloch to the locH of sprite captionsprite
- puppetSprite(captionsprite, 1)
- set the locH of sprite captionsprite to 1000
- updateStage()
- set the itemDelimiter to "@"
- set tmp to item gCurMap + 1 of gMapCap
- delete line 1 to 2 of tmp
- set the text of field "caption-map" to tmp
- set the itemDelimiter to ","
- set centerpoint to 265
- set caph to the height of cast "caption-map"
- set the locV of sprite captionsprite to centerpoint - (caph / 2)
- set the locH of sprite captionsprite to captionloch
- updateStage()
- EndTrapMouse()
- end
-
- on QTbuttonClick
- global gQTbuttons, gQTloch, gQTstatus
- NavButtonClose()
- if the movieRate of sprite 16 then
- puppetSprite(11, 1)
- set the movieRate of sprite 16 to 0
- set the castNum of sprite 11 to value(item 1 of gQTbuttons)
- set gQTstatus to 0
- else
- puppetSprite(11, 1)
- puppetSprite(16, 0)
- if the movieTime of sprite 16 = the duration of cast "QTcast" then
- set the movieTime of sprite 16 to 0
- end if
- set the movieRate of sprite 16 to 1
- set the castNum of sprite 11 to value(item 2 of gQTbuttons)
- set gQTstatus to 1
- end if
- end
-