home *** CD-ROM | disk | FTP | other *** search
- on GoArticle
- global gChapters, gTitles, gArticles, gDates, gCaptions, gCurCutting, gCurChap, gCurArticle, gName, mytext, gArticlePage, gFullCuttings, gFormattedText, gTextPages, gMaxLines, gCurIndex, gWorld, gSeenMaps, gPaperLoch, gMakerName, gHeadlocH, gNameLoch, gNameLocv, gMakerNum, gQTpath, gSoundpath, gNuggetTime, gNuggetDelay, gNameCastnum, gInAMap, gcurtype, gPrintHead, gCurPic, gNuggetOn
- set gNuggetTime to the ticks
- set gNuggetOn to 0
- set the text of field "ArticleNumber" to gMakerNum & ":" && gCurChap & "." & gCurArticle
- set type to getAt(getAt(gArticles, gCurChap), gCurArticle)
- set gcurtype to type
- set picsprite to 9
- set cuttingsprite to 6
- set titlesprite to 8
- set papersprite to 11
- set datesprite to 12
- set captionsprite to 7
- set forwardbutton to 20
- set backbutton to 19
- set headsprite to 10
- set namesprite to 4
- set headloch to gHeadlocH
- set gInAMap to 0
- set gPrintHead to EMPTY
- puppetTempo(25)
- sound playFile 1, gSoundpath & "S" & gMakerNum & "A" & gCurChap & gCurArticle
- if not (the frameLabel contains "pict") then
- set gCurPic to 0
- end if
- if (type <> "cutting") and (gWorld = "design") and (the frameLabel = "cutting") then
- set the locH of sprite namesprite to 1000
- set the castNum of sprite namesprite to gNameCastnum
- end if
- set the itemDelimiter to "."
- set tmp to item 2 of the frameLabel
- set the itemDelimiter to ","
- if (tmp = "anim") or (the frameLabel = "qt") then
- if the frameLabel = "qt" then
- set the movieRate of sprite 16 to 0
- updateStage()
- end if
- puppetSprite(47, 1)
- set the castNum of sprite 47 to the number of cast "screenblank"
- spriteBox(47, 0, 0, 640, 480)
- updateStage()
- puppetSprite(47, 0)
- end if
- if type = "pic" then
- GoPictArticle()
- else
- if type = "animation" then
- GoAnimArticle()
- else
- if type = "map" then
- set gInAMap to 1
- puppetSprite(forwardbutton, 0)
- puppetSprite(backbutton, 0)
- puppetSprite(papersprite, 0)
- GetMapCap()
- unpuppet("4,10")
- go(gMakerName)
- CleanMem()
- puppetTempo(12)
- set the visible of sprite 19 to 1
- set the visible of sprite 20 to 1
- set the locH of sprite headsprite to headloch
- else
- if type = "movie" then
- set the locH of sprite headsprite to headloch
- puppetSprite(forwardbutton, 0)
- puppetSprite(backbutton, 0)
- puppetSprite(papersprite, 0)
- set the text of field "caption-qt" to " "
- unpuppet("4,10")
- set cnum to the number of cast "QTcast"
- set the fileName of cast cnum to gQTpath & "BLACK.MOV"
- set the name of cast cnum to "QTcast"
- if gMakerNum = 119 then
- go("QT.MAT")
- else
- go("QT")
- end if
- CleanMem()
- UnloadMem()
- if (gWorld = "Senses") or (gWorld = "Design") then
- set the locH of sprite namesprite to gNameLoch
- set the locV of sprite namesprite to gNameLocv
- end if
- puppetSprite(captionsprite, 1)
- set captionloch to the locH of sprite captionsprite
- set the castNum of sprite captionsprite to the number of cast "caption-qt"
- set the locH of sprite captionsprite to 1000
- set the locH of sprite picsprite to 1000
- updateStage()
- set tmpcap to GetCaption()
- set the text of field "caption-qt" to tmpcap
- if gWorld <> "Senses" then
- set the textHeight of field "caption-qt" to 18
- else
- set the textHeight of field "caption-qt" to 25
- end if
- if gWorld = "Discover" then
- set centerpoint to 250
- else
- set centerpoint to 280
- end if
- set caph to the height of cast "caption-qt"
- if (gWorld <> "Senses") and (gWorld <> "Body") then
- set the locV of sprite captionsprite to centerpoint - (caph / 2)
- else
- if gWorld = "Body" then
- set the locV of sprite captionsprite to 112
- end if
- end if
- set the locH of sprite captionsprite to captionloch
- updateStage()
- puppetSprite(11, 1)
- set fname to gQTpath & "V" & gMakerNum & ".MOV"
- put fname
- set the fileName of cast cnum to fname
- set the name of cast cnum to "QTcast"
- set the movieTime of sprite 16 to 0
- updateStage()
- set the movieRate of sprite 16 to 1
- updateStage()
- SetVolume()
- else
- if type = "sound" then
- GoSoundArticle()
- else
- if type = "cutting" then
- puppetSprite(forwardbutton, 0)
- puppetSprite(backbutton, 0)
- if gWorld <> "mind" then
- set the locH of sprite headsprite to 1000
- end if
- if (gWorld = "senses") or (gWorld = "mind") then
- set gMaxLines to 16
- else
- if gWorld = "Discover" then
- set gMaxLines to 15
- else
- set gMaxLines to 17
- end if
- end if
- if the frameLabel <> "cutting" then
- set the text of field "cutting" to " "
- set the textSize of field "cutting" to 18
- set the text of field "date" to " "
- set the text of field "caption" to " "
- set the text of field "title" to " "
- puppetSprite(picsprite, 1)
- set the locH of sprite picsprite to 1000
- if (gWorld = "Senses") or (gWorld = "Design") then
- set the locH of sprite namesprite to 1000
- end if
- unpuppet("4,10")
- if gMakerNum = 119 then
- go("cutting.MAT")
- else
- go("cutting")
- end if
- CleanMem()
- puppetSprite(papersprite, 1)
- set gPaperLoch to the locH of sprite papersprite
- set the locH of sprite papersprite to 1000
- end if
- cursor(4)
- puppetSprite(cuttingsprite, 1)
- puppetSprite(titlesprite, 1)
- puppetSprite(papersprite, 1)
- puppetSprite(datesprite, 1)
- puppetSprite(captionsprite, 1)
- set cuttingloch to the locH of sprite cuttingsprite
- set titleloch to the locH of sprite titlesprite
- set dateloch to the locH of sprite datesprite
- set captionloch to the locH of sprite captionsprite
- set the castNum of sprite captionsprite to the number of cast "caption"
- set the locH of sprite cuttingsprite to 1000
- set the locH of sprite captionsprite to 1000
- set the locH of sprite datesprite to 1000
- set the locH of sprite titlesprite to 1000
- updateStage()
- set tmpdate to getAt(getAt(gDates, gCurChap), gCurArticle)
- set the itemDelimiter to "@"
- set tmpcap to item gCurChap of gTitles
- set the itemDelimiter to "#"
- set the text of field "title" to item gCurArticle of tmpcap
- set the itemDelimiter to ","
- set tmpcap to GetCaption()
- set the text of field "caption" to tmpcap
- if not stringp(title) then
- set title to " "
- end if
- if not stringp(date) then
- set date to " "
- end if
- set the textHeight of field "caption" to 18
- set tmpnum to charToNum(char 1 of tmpdate)
- set paper to item 1 of tmpdate
- delete item 1 of tmpdate
- set paper to word 1 to the number of words in paper of paper
- if word 1 of paper = "The" then
- delete word 1 of paper
- end if
- if paper = "Time" then
- set paper to "Times"
- else
- if paper = "Sunday Time" then
- set paper to "Sunday Times"
- else
- if paper = "Times Literary Supplement" then
- set paper to "tls"
- end if
- end if
- end if
- if gMakerNum = 119 then
- set the castNum of sprite papersprite to the number of cast (paper & ".logo.MAT")
- else
- set the castNum of sprite papersprite to the number of cast (paper & ".logo")
- end if
- if char 1 of tmpdate = " " then
- delete char 1 of tmpdate
- end if
- set the text of field "date" to tmpdate
- set gPrintHead to item gCurChap of gTitles & RETURN
- if paper = "Times" then
- put "The Times" & RETURN after gPrintHead
- else
- if paper = "Sunday Times" then
- put "Sunday Times" & RETURN after gPrintHead
- else
- if paper = "tls" then
- put "Times Literary Supplement" & RETURN after gPrintHead
- else
- put paper & RETURN after gPrintHead
- end if
- end if
- end if
- put tmpdate & RETURN after gPrintHead
- set gArticlePage to 1
- set art to gCurChap & "." & gCurArticle
- set num to the number of items in gCurIndex
- set index to -1
- repeat with i = 2 to num
- set tmp to item i of gCurIndex
- set tmp2 to item i + 1 of gCurIndex
- if art = char 1 to 3 of tmp then
- set the itemDelimiter to ":"
- set index to value(item 2 of tmp)
- set nextindex to value(item 2 of tmp2)
- set the itemDelimiter to ","
- exit repeat
- end if
- end repeat
- if index <> -1 then
- if (nextindex <> EMPTY) and (nextindex <> 0) then
- if index > 0 then
- set gCurCutting to char index to nextindex of gFullCuttings
- else
- set gCurCutting to char 1 to nextindex of gFullCuttings
- end if
- else
- if index > 0 then
- set gCurCutting to char index to the number of chars in gFullCuttings of gFullCuttings
- else
- set gCurCutting to char 1 to the number of chars in gFullCuttings of gFullCuttings
- end if
- end if
- delete line 1 to 2 of gCurCutting
- if gWorld = "Discover" then
- set gFormattedText to FillText(gCurCutting, "Times", 18, 400)
- else
- set gFormattedText to FillText(gCurCutting, "Times", 18, 440)
- end if
- delete line the number of lines in gFormattedText of gFormattedText
- set the text of field "cutting" to line 1 to gMaxLines of gFormattedText
- set the textHeight of field "cutting" to 21
- set tmplines to the number of lines in gFormattedText
- set gTextPages to tmplines / gMaxLines
- if (gTextPages * gMaxLines) < tmplines then
- set gTextPages to gTextPages + 1
- end if
- end if
- if gTextPages = 1 then
- set the visible of sprite forwardbutton to 0
- else
- set the visible of sprite forwardbutton to 1
- end if
- set the visible of sprite backbutton to 0
- if gWorld = "Power" then
- set centerpoint to 277
- else
- if gWorld = "Design" then
- set centerpoint to 295
- else
- if gWorld = "Senses" then
- set centerpoint to 295
- else
- if gWorld = "Mind" then
- set centerpoint to 282
- else
- if gWorld = "Body" then
- set centerpoint to 275
- else
- if gWorld = "Discover" then
- set centerpoint to 267
- end if
- end if
- end if
- end if
- end if
- end if
- set caph to the height of cast "caption"
- set the locV of sprite captionsprite to centerpoint - (caph / 2)
- set the locH of sprite cuttingsprite to cuttingloch
- set the locH of sprite titlesprite to titleloch
- set the locH of sprite datesprite to dateloch
- set the locH of sprite papersprite to gPaperLoch
- set the locH of sprite captionsprite to captionloch
- if gWorld = "Senses" then
- set the locH of sprite namesprite to 95
- set the locV of sprite namesprite to 25
- else
- if gWorld = "Design" then
- set the castNum of sprite namesprite to the number of cast (gMakerNum & ".name2")
- set the locH of sprite namesprite to 92
- set the locV of sprite namesprite to 48
- end if
- end if
- updateStage()
- cursor(0)
- else
- if (type = "partwork") or (type = "Partwork") then
- if gCurChap = 1 then
- if gWorld = "senses" then
- set gMaxLines to 20
- else
- if gWorld = "mind" then
- set gMaxLines to 17
- else
- if gWorld = "body" then
- set gMaxLines to 17
- else
- if gWorld = "discover" then
- set gMaxLines to 15
- else
- set gMaxLines to 15
- end if
- end if
- end if
- end if
- else
- if gWorld = "senses" then
- set gMaxLines to 11
- else
- if gWorld = "mind" then
- set gMaxLines to 8
- else
- if gWorld = "discover" then
- set gMaxLines to 8
- else
- if gWorld = "design" then
- set gMaxLines to 7
- else
- if gWorld = "power" then
- set gMaxLines to 9
- else
- if gWorld = "body" then
- set gMaxLines to 11
- else
- set gMaxLines to 15
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- set the locH of sprite headsprite to headloch
- set the locH of sprite picsprite to 1000
- puppetSprite(papersprite, 0)
- set the text of field "caption-partwork" to " "
- if gWorld = "senses" then
- set the textHeight of field "caption-partwork" to 25
- else
- set the textHeight of field "caption-partwork" to 18
- end if
- set the text of field "partwork" to " "
- set the text of field "partwork2" to " "
- set the textSize of field "partwork" to 14
- set the textSize of field "partwork2" to 14
- unpuppet("4,10")
- if gCurChap > 1 then
- if gMakerNum = 119 then
- go("innerpartwork.MAT")
- else
- go("innerpartwork")
- end if
- puppetSprite(picsprite, 1)
- set the locH of sprite picsprite to 1000
- else
- if gWorld = "Power" then
- go("partwork")
- puppetSprite(picsprite, 1)
- set the locH of sprite picsprite to 1000
- else
- if gMakerNum = 119 then
- go("partwork2.MAT")
- else
- go("partwork2")
- end if
- end if
- end if
- CleanMem()
- puppetSprite(cuttingsprite, 1)
- set cuttingloch to the locH of sprite cuttingsprite
- set the locH of sprite cuttingsprite to 1000
- puppetSprite(captionsprite, 1)
- set captionloch to the locH of sprite captionsprite
- set the locH of sprite captionsprite to 1000
- updateStage()
- if (gWorld = "Senses") or (gWorld = "Design") then
- set the locH of sprite namesprite to gNameLoch
- set the locV of sprite namesprite to gNameLocv
- end if
- set gArticlePage to 1
- set tmpcap to GetCaption()
- set the text of field "caption-partwork" to tmpcap
- set num to the number of items in gCurIndex
- set index to -1
- set art to gCurChap & "." & gCurArticle
- repeat with i = 2 to num
- set tmp to item i of gCurIndex
- set tmp2 to item i + 1 of gCurIndex
- if (art = char 1 to 3 of tmp) or ((gCurChap = 1) and (char 1 of tmp = "1")) then
- set the itemDelimiter to ":"
- set index to value(item 2 of tmp)
- set nextindex to value(item 2 of tmp2)
- set the itemDelimiter to ","
- exit repeat
- end if
- end repeat
- put "index = " && index && "nextindex = " && nextindex
- if index <> -1 then
- if (nextindex <> EMPTY) and (nextindex <> 0) then
- if index > 0 then
- set gCurCutting to char index to nextindex of gFullCuttings
- else
- set gCurCutting to char 1 to nextindex of gFullCuttings
- end if
- else
- if index > 0 then
- set gCurCutting to char index to the number of chars in gFullCuttings of gFullCuttings
- else
- set gCurCutting to char 1 to the number of chars in gFullCuttings of gFullCuttings
- end if
- end if
- if index = 0 then
- delete line 1 of gCurCutting
- else
- delete line 1 to 2 of gCurCutting
- end if
- if gWorld = "senses" then
- set cuttingwidth to 360
- else
- if gWorld = "discover" then
- set cuttingwidth to 440
- else
- if gWorld = "body" then
- set cuttingwidth to 440
- else
- set cuttingwidth to 440
- end if
- end if
- end if
- if (gWorld = "Power") and (gCurChap = 1) then
- set gFormattedText to FillText(gCurCutting, "Geneva", 14, 170)
- delete line the number of lines in gFormattedText of gFormattedText
- set the text of field "partwork" to line 1 to gMaxLines of gFormattedText
- set the textHeight of field "partwork" to 20
- set the textHeight of field "partwork2" to 20
- set gFormattedText to line 1 to gMaxLines of gFormattedText
- set tmpnum to the number of words in gFormattedText
- delete word 1 to tmpnum of gCurCutting
- set tmptext to FillText(gCurCutting, "Geneva", 14, cuttingwidth)
- put RETURN & tmptext after gFormattedText
- delete line the number of lines in gFormattedText of gFormattedText
- set tmplines to the number of lines in gFormattedText
- set tmpchar to the number of chars in gFormattedText
- if char tmpchar of gFormattedText = RETURN then
- put "." into char tmpchar of gFormattedText
- else
- put "." into char tmpchar + 1 of gFormattedText
- end if
- else
- set gFormattedText to FillText(gCurCutting, "Geneva", 14, cuttingwidth)
- delete line the number of lines in gFormattedText of gFormattedText
- set tmplines to the number of lines in gFormattedText
- set tmpchar to the number of chars in gFormattedText
- if char tmpchar of gFormattedText = RETURN then
- put "." into char tmpchar of gFormattedText
- else
- put "." into char tmpchar + 1 of gFormattedText
- end if
- set the text of field "partwork2" to " "
- set the textHeight of field "partwork2" to 20
- set the text of field "partwork2" to line 1 to gMaxLines of gFormattedText
- end if
- set gTextPages to tmplines / gMaxLines
- if (gTextPages * gMaxLines) < tmplines then
- set gTextPages to gTextPages + 1
- end if
- if gTextPages = 1 then
- set the visible of sprite forwardbutton to 0
- else
- set the visible of sprite forwardbutton to 1
- end if
- end if
- set the visible of sprite backbutton to 0
- updateStage()
- if gCurChap > 1 then
- set piccast to the number of cast (gMakerNum & "-" & gCurChap & "." & gCurArticle)
- put gMakerNum & "-" & gCurChap & "." & gCurArticle
- if piccast > 0 then
- set the stretch of sprite picsprite to 0
- set the castNum of sprite picsprite to piccast
- set w to 1.0 * the width of cast piccast / 2
- set h to 1.0 * the height of cast piccast / 2
- if gWorld = "senses" then
- set the locH of sprite picsprite to 210 + w
- set the locV of sprite picsprite to 50 + h
- else
- if gWorld = "Design" then
- set the locH of sprite picsprite to 125 + w
- set the locV of sprite picsprite to 132 + h
- else
- if gWorld = "power" then
- set the locH of sprite picsprite to 223 + w
- set the locV of sprite picsprite to 48 + h
- else
- if gWorld = "Mind" then
- set the locH of sprite picsprite to 38 + w
- set the locV of sprite picsprite to 132 + h
- else
- if gWorld = "body" then
- set the locH of sprite picsprite to 140 + w
- set the locV of sprite picsprite to 95 + h
- else
- set the locH of sprite picsprite to 70 + w
- set the locV of sprite picsprite to 70 + h
- end if
- end if
- end if
- end if
- end if
- end if
- else
- if gWorld = "Power" then
- puppetTempo(2)
- if label(gMakerNum & ".map") then
- go(gMakerNum & ".map")
- end if
- set gSeenMaps to 1
- end if
- end if
- set the locH of sprite cuttingsprite to cuttingloch
- puppetSprite(cuttingsprite, 0)
- set the locH of sprite captionsprite to cuttingloch
- puppetSprite(captionsprite, 0)
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- NavButtonUpdate()
- EndTrapMouse()
- end
-
- on CheckPrint
- global gPrintHead, gCurCutting, gMakerNum
- end
-