home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global blockPos, overLay, moviesList, frameList, choiceMade, CRLF
- set the exitLock to 1
- set the keyDownScript to "quitcheck"
- set CRLF to RETURN & numToChar(10)
- set choiceMade to 0
- set frameList to "pre71,72-75,76-79,80-83,84-87,88-91,92-95"
- set moviesList to "air.dir,land.dir,water.dir,animals.dir,people.dir,energy.dir,response.dir,dev.dir"
- set blockPos to "27,139,249,361"
- set overLay to "966,967,968,969"
- repeat with n = 1 to 8
- if the movieName = item n of moviesList then
- setVari(string(the movieName))
- end if
- end repeat
- end
-
- on quitCheck
- global moviesList
- set shortCutMovies to "NMM.dir,choice.dir,intro.dir,credits.dir"
- set theKeysList to "L,S,P,B,Q,A,I,N,K,H"
- set allowKey to 0
- repeat with n = 1 to 10
- if the controlDown and (the key = item n of theKeysList) then
- set allowKey to 1
- exit repeat
- end if
- end repeat
- if allowKey = 0 then
- exit
- else
- if the controlDown and (the key = "Q") then
- doQuit()
- end if
- set allowShortCut to 1
- repeat with n = 1 to the number of items in shortCutMovies
- if the movieName = item n of shortCutMovies then
- set allowShortCut to 0
- end if
- end repeat
- if allowShortCut = 1 then
- if the controlDown and (the key = "L") then
- doLoadSess()
- end if
- if the controlDown and (the key = "S") then
- doSaveSess()
- end if
- if the controlDown and (the key = "P") then
- doPrintScr()
- end if
- if the controlDown and (the key = "B") then
- doPrevScr()
- end if
- if the controlDown and (the key = "A") then
- doArtMenu()
- end if
- if the controlDown and (the key = "I") then
- doImgMenu()
- end if
- if the controlDown and (the key = "N") then
- notepadOpen()
- end if
- if the controlDown and (the key = "K") then
- keywordOpen()
- end if
- if the controlDown and (the key = "H") then
- helpOpen()
- end if
- end if
- end if
- end
-
- on setVari subject
- global theSection, theSectionT, theSLine, lineheight, spHoriz, spVert, col1amount, col2amount, col1width, col2width, theimageLink, mapLinePos
- set the ink of sprite 44 to 36
- set theSection to 1
- set theSectionT to 1
- set theSLine to 1
- set lineheight to 20
- set spHoriz to 132
- set spVert to 74
- set theimageLink to field "imageLink"
- if subject = "air.dir" then
- set mapLinePos to 75
- set col1amount to 7
- set col2amount to 4
- set col1width to 178
- set col2width to 142
- end if
- if subject = "land.dir" then
- set mapLinePos to 93
- set col1amount to 8
- set col2amount to 6
- set col1width to 147
- set col2width to 173
- end if
- if subject = "water.dir" then
- set mapLinePos to 111
- set col1amount to 6
- set col2amount to 8
- set col1width to 168
- set col2width to 152
- end if
- if subject = "animals.dir" then
- set mapLinePos to 129
- set col1amount to 5
- set col2amount to 4
- set col1width to 186
- set col2width to 134
- end if
- if subject = "people.dir" then
- set mapLinePos to 147
- set col1amount to 5
- set col2amount to 0
- set col1width to 154
- set col2width to 166
- end if
- if subject = "energy.dir" then
- set mapLinePos to 165
- set col1amount to 6
- set col2amount to 7
- set col1width to 145
- set col2width to 175
- end if
- if subject = "response.dir" then
- set mapLinePos to 183
- set col1amount to 7
- set col2amount to 3
- set col1width to 181
- set col2width to 139
- end if
- if subject = "dev.dir" then
- set mapLinePos to 201
- set col1amount to 6
- set col2amount to 0
- set col1width to 196
- set col2width to 124
- end if
- end
-
- on createLocationPhoto
- global theImage
- if char 10 of item 1 of theImage = "p" then
- if the number of items in theImage = 1 then
- put "," & the frame - 1 after theImage
- put "," & the movieName after theImage
- end if
- end if
- end
-
- on clearLists
- global choiceMade
- set the foreColor of field 971 to 255
- set the foreColor of field 973 to 255
- set the castNum of sprite 29 to 36
- setOffStage("20,21,23,24,25,31,33,34,43,44,45,46")
- if choiceMade = 1 then
- if the frame = 1 then
- set the castNum of sprite 35 to 977
- else
- set the castNum of sprite 35 to 978
- end if
- set the blend of sprite 44 to 100
- set the castNum of sprite 40 to 17
- set the locH of sprite 35 to 454
- set the locV of sprite 35 to 72
- set the locV of sprite 32 to 42
- set the castNum of sprite 29 to 36
- else
- set the castNum of sprite 40 to 39
- end if
- updateStage()
- end
-
- on createPath folder, fileName
- set delimiter to "\"
- set fullPath to the pathName & char 2 of fileName & folder & delimiter & fileName
- return fullPath
- end
-
- on MMopen
- set the castNum of sprite 44 to 980
- set the locH of sprite 44 to 0
- set the locV of sprite 44 to 75
- end
-
- on setDelimOn
- set the itemDelimiter to ">"
- end
-
- on setDelimOff
- set the itemDelimiter to ","
- end
-
- on setPuppets start, end, boolVal
- repeat with channel = start to end
- puppetSprite(channel, boolVal)
- end repeat
- end
-
- on setOffStage whichSprite
- repeat with n = 1 to the number of items in whichSprite
- set the locH of sprite value(item n of whichSprite) to -20000
- end repeat
- end
-
- on setTopicField
- set the textSize of field "topicHead" to 9
- set the textHeight of field "topicHead" to 14
- set the textFont of field "topicHead" to "geneva"
- set the foreColor of cast "topicHead" to 32
- end
-
- on photoLinkCheck
- global theSection, theimageLink, choiceMade
- if choiceMade = 1 then
- repeat with n = 2 to 12
- if the castNum of sprite n <> 0 then
- puppetSprite(n, 1)
- repeat with i = 1 to the number of items in line value(theSection) of theimageLink
- if item i of line theSection of theimageLink = the name of cast the castNum of sprite n then
- set the castNum of sprite n to the castNum of sprite n + 60
- end if
- end repeat
- end if
- end repeat
- end if
- end
-
- on photoLinkCheckOff
- repeat with n = 2 to 12
- if the castNum of sprite n <> 0 then
- if (the castNum of sprite n > 310) and (the castNum of sprite n < 820) then
- puppetSprite(n, 1)
- set the castNum of sprite n to the castNum of sprite n - 60
- end if
- end if
- end repeat
- end
-
- on moveGreenBlockOff whblock
- repeat with n = 1 to the number of items in whblock
- set the locV of sprite (value(item n of whblock) + 34) to -2000
- end repeat
- end
-
- on moveGreenBlockOn whblock
- repeat with n = 1 to the number of items in whblock
- set the locV of sprite (value(item n of whblock) + 34) to 110
- end repeat
- end
-
- on setGreenLine start, end
- set linepos to "-10,32,150,267,385,460,505,650"
- spriteBox(34, value(item start of linepos), 116, value(item end of linepos), 118)
- end
-
- on doPrintScr
- global theCaption
- openXLib("Pmatic.dll")
- set printTemp to "© 1996 News Multimedia Ltd"
- if objectp(myPrinter) then
- myPrinter(mdispose)
- end if
- set myPrinter to PrintOMatic(mnew)
- if objectp(myPrinter) then
- myPrinter(mRegister, "PMAT130-221-01294")
- myPrinter(mSetProgressMsg, "Now printing from Planet Earth...")
- myPrinter(mSetDocumentName, "Planet Earth Screen")
- myPrinter(mReset)
- myPrinter(mSetMargins, 50, 50, 50, 50)
- myPrinter(mSetTextFont, "times")
- myPrinter(mSetTextSize, 12)
- myPrinter(mNewPage)
- myPrinter(mDrawText, printTemp, 0, 440)
- myPrinter(mStagePicture, 0, 40, 480, 480)
- if myPrinter(mDoJobSetup) = 1 then
- myPrinter(mPrint)
- else
- exit
- end if
- else
- alert("Sorry there is a printing problem")
- end if
- if objectp(myPrinter) then
- myPrinter(mdispose)
- end if
- end
-
- on doSaveSess
- global prevList, theImage, theImageList, theArticle, theArticleList, toolWindow, CRLF
- set theSess to "Planet Earth Session File 412370098747357" & CRLF
- put "<theImageVar>" & CRLF after theSess
- if voidp(theImage) = 1 then
- put "Void" & CRLF after theSess
- else
- put theImage & CRLF after theSess
- end if
- put "<theImageListVar>" & CRLF after theSess
- if voidp(theImageList) = 1 then
- put "Void" & CRLF after theSess
- else
- put theImageList & CRLF after theSess
- end if
- put "<theArticleVar>" & CRLF after theSess
- if voidp(theArticle) = 1 then
- put "Void" & CRLF after theSess
- else
- put theArticle & CRLF after theSess
- end if
- put "<theArticleListVar>" & CRLF after theSess
- if voidp(theArticleList) = 1 then
- put "Void" & CRLF after theSess
- else
- put theArticleList & CRLF after theSess
- end if
- put "<notepadVar>" & CRLF after theSess
- if objectp(toolWindow) then
- tell toolWindow
- if the text of field "noteField" = EMPTY then
- put " " & CRLF after theSess
- else
- put the text of field "noteField" & CRLF after theSess
- end if
- end tell
- end if
- put "<theLastScreen>" & CRLF & line 1 of prevList & CRLF after theSess
- put "<end>" after theSess
- openXLib("fileio")
- set thetextfile to FileIO(mnew, "?write", "Session1.txt")
- if objectp(thetextfile) then
- put thetextfile(mWriteString, theSess)
- thetextfile(mdispose)
- closeXLib("fileio")
- else
- end if
- end
-
- on doLoadSess
- global theImage, theImageList, theArticle, theArticleList, toolWindow, articleWindow, ImageWindow, whWindow
- openXLib("fileio")
- set thetextfile to FileIO(mnew, "?read", "TXT")
- if objectp(thetextfile) then
- set theSessIn to thetextfile(mReadFile)
- thetextfile(mdispose)
- closeXLib("fileio")
- repeat with n = 1 to the number of chars in theSessIn
- if charToNum(char n of theSessIn) = 10 then
- delete char n of theSessIn
- end if
- end repeat
- set theTagsList to EMPTY
- if line 1 of theSessIn <> "Planet Earth Session File 412370098747357" then
- alert("Sorry - this is not a valid session File")
- else
- repeat with n = 1 to the number of lines in theSessIn
- if char 1 of line n of theSessIn = "<" then
- put n & "," & line n of theSessIn & RETURN after theTagsList
- end if
- end repeat
- set theImageTemp to line value(item 1 of line 1 of theTagsList) + 1 of theSessIn
- if (theImageTemp = "Void") or (theImageTemp = EMPTY) then
- nothing()
- else
- set theImage to theImageTemp
- end if
- set theImageListTemp to line value(item 1 of line 2 of theTagsList) + 1 to value(item 1 of line 3 of theTagsList) - 1 of theSessIn
- if (theImageListTemp = "Void") or (theImageListTemp = EMPTY) then
- nothing()
- else
- set theImageList to theImageListTemp
- tell ImageWindow
- if char 10 to 12 of theImage = "pct" then
- set photoRect to rect(26, 40, 474, 396)
- set the rect of ImageWindow to photoRect
- setPuppets(1, 48, 0)
- go(1)
- set whWindow to "small"
- else
- set graphicRect to rect(10, 35, 618, 485)
- set the rect of ImageWindow to graphicRect
- setPuppets(1, 48, 0)
- go("graphic")
- set whWindow to "large"
- end if
- end tell
- end if
- set theArticleTemp to line value(item 1 of line 3 of theTagsList) + 1 of theSessIn
- if (theArticleTemp = "Void") or (theArticleTemp = EMPTY) then
- nothing()
- else
- set theArticle to theArticleTemp
- end if
- set theArticleListTemp to line value(item 1 of line 4 of theTagsList) + 1 to value(item 1 of line 5 of theTagsList) - 1 of theSessIn
- if (theArticleListTemp = "Void") or (theArticleListTemp = EMPTY) then
- nothing()
- else
- set theArticleList to theArticleListTemp
- tell articleWindow
- go(1)
- end tell
- end if
- set noteTemp to line value(item 1 of line 5 of theTagsList) + 1 to value(item 1 of line 6 of theTagsList) - 1 of theSessIn
- tell toolWindow
- if noteTemp = "<theLastScreen>" then
- set the text of field "noteField" to EMPTY
- else
- set the text of field "noteField" to noteTemp
- end if
- end tell
- set lastscreenTemp to line value(item 1 of line 6 of theTagsList) + 1 to value(item 1 of line 7 of theTagsList) - 1 of theSessIn
- puppetSprite(48, 1)
- set the type of sprite 48 to 2
- set the castNum of sprite 48 to 910
- set the foreColor of sprite 48 to 255
- spriteBox(48, 0, 0, 640, 480)
- updateStage()
- go(value(item 1 of lastscreenTemp), string(item 2 of lastscreenTemp))
- end if
- else
- end if
- end
-
- on doPrevScr
- global prevList, choiceMade
- tell the stage
- if item 2 of line 2 of prevList = "choice.dir" then
- clearAllWindows()
- end if
- if the movieName = item 2 of line 2 of prevList then
- if the frame < 5 then
- puppetSprite(48, 1)
- set the type of sprite 48 to 2
- set the castNum of sprite 48 to 910
- set the foreColor of sprite 48 to 255
- spriteBox(48, 0, 0, 640, 480)
- updateStage()
- if the locH of sprite 31 > 0 then
- clearLists()
- end if
- if choiceMade = 0 then
- set the castNum of sprite 40 to cast "sectionChoose"
- setOffStage("35")
- else
- set the castNum of sprite 35 to 978
- end if
- setOffStage("25,34")
- setOffStage("43")
- setPuppets(1, 1, 0)
- setPuppets(7, 13, 0)
- setPuppets(26, 26, 0)
- go(value(item 1 of line 2 of prevList))
- setPuppets(15, 18, 1)
- setPuppets(20, 21, 1)
- setPuppets(23, 25, 1)
- setPuppets(27, 35, 1)
- setPuppets(40, 46, 1)
- setOffStage("48")
- setPuppets(48, 48, 0)
- if choiceMade = 1 then
- set the locH of sprite 35 to 454
- set the locV of sprite 35 to 72
- set the castNum of sprite 35 to 978
- end if
- else
- setPuppets(1, 48, 0)
- set choiceMade to 0
- go(value(item 1 of line 2 of prevList))
- end if
- else
- puppetSprite(48, 1)
- set the type of sprite 48 to 2
- set the castNum of sprite 48 to 910
- set the foreColor of sprite 48 to 255
- spriteBox(48, 0, 0, 640, 480)
- updateStage()
- if the movieName = "topLevel.dir" then
- go(value(item 1 of line 2 of prevList), string(item 2 of line 2 of prevList))
- setOffStage("48")
- setPuppets(48, 48, 0)
- end if
- go(value(item 1 of line 2 of prevList), string(item 2 of line 2 of prevList))
- end if
- if the number of lines in prevList > 4 then
- delete line 5 to the number of lines in prevList of prevList
- end if
- end tell
- end
-
- on doQuit
- global toolWindow, articleWindow, ImageWindow
- sound stop 1
- sound stop 2
- puppetSprite(48, 1)
- set the type of sprite 48 to 2
- set the castNum of sprite 48 to 910
- set the foreColor of sprite 48 to 255
- spriteBox(48, 0, 0, 640, 480)
- updateStage()
- if objectp(ImageWindow) then
- set the visible of ImageWindow to 0
- end if
- if objectp(articleWindow) then
- set the visible of articleWindow to 0
- end if
- if objectp(toolWindow) then
- set the visible of toolWindow to 0
- end if
- tell the stage
- go(1, "credits")
- end tell
- end
-