home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global linkString, backString, photoFiles, textFiles, videoFiles, movieLocation, indexString, CDPath, photoNumber, textNumber, videoNumber, currentLine, subTopicNames
- set the floatPrecision to 2
- set the directToStage of cast 32 to 1
- set the visible of sprite 15 to 0
- puppetSprite(15, 1)
- puppetSprite(10, 1)
- set the visible of sprite 43 to 0
- globalButtonInit(45, 48)
- set subTopicNames to "hbasics,insideh,cyclones,htrack,uhurricn,hsafe"
- puppetSprite(8, 1)
- set the mouseDownScript to "click"
- if (linkString = EMPTY) or (linkString = "hurrican 0 0 0 0") then
- set movieLocation to "hurrican 0 0 0 0"
- else
- set movieLocation to linkString
- setLink()
- end if
- end
-
- on click
- if the clickOn then
- puppetSound("click1.aif")
- updateStage()
- puppetSound(0)
- end if
- end
-
- on stopMovie
- puppetSprite(15, 0)
- puppetSprite(26, 0)
- repeat with i = 2 to 8
- puppetSprite(i, 0)
- end repeat
- puppetSprite(38, 0)
- end
-
- on videoLoad
- global start, duration, ratio, videoNumber, videoFiles
- if item 1 of videoFiles contains "*" then
- else
- unLoadCast(32)
- set the fileName of cast 32 to item 1 of line videoNumber of videoFiles
- set the text of field "vcounter" to videoNumber && "of" && the number of lines in videoFiles - 1
- set the locH of sprite 28 to start
- set duration to float(the duration of cast 32)
- set ratio to the width of sprite 27 / duration
- set the locH of sprite 28 to start + (the movieTime of sprite 16 * ratio)
- set the castNum of sprite 28 to 131
- set the text of field "videoTitle" to item 2 to 3 of line videoNumber of videoFiles
- end if
- end
-
- on loadControlFiles file
- global photoFiles, textFiles, videoFiles, CDPath
- set theFile to CDPath & "hurrican\" & file & ".pcf"
- set obj to FileIO(mnew, "read", theFile)
- if not objectp(obj) then
- alert("cant load " && theFile)
- else
- set photoFiles to obj(mReadFile)
- obj(mdispose)
- end if
- set theFile to CDPath & "hurrican\" & file & ".tcf"
- set obj to FileIO(mnew, "read", theFile)
- if not objectp(obj) then
- alert("cant load " && theFile)
- else
- set textFiles to obj(mReadFile)
- obj(mdispose)
- end if
- set theFile to CDPath & "hurrican\" & file & ".vcf"
- set obj to FileIO(mnew, "read", theFile)
- if not objectp(obj) then
- alert("cant load " && theFile)
- else
- set videoFiles to obj(mReadFile)
- obj(mdispose)
- if videoFiles contains "*" then
- set the castNum of sprite 10 to 148
- else
- set the castNum of sprite 10 to 130
- end if
- end if
- end
-
- on setUpTypes controlFileName
- global photoFiles, photoNumber, videoFiles, videoNumber, textNumber, textFiles, textCast, currentLine, subTopicNames
- set photoNumber to 1
- set videoNumber to 1
- set textNumber to 1
- set currentLine to 9
- loadControlFiles(controlFileName)
- set the text of field "counter" to photoNumber && "of" && the number of lines in photoFiles - 1
- set the text of field "vcounter" to videoNumber && "of" && the number of lines in videoFiles - 1
- set the text of field "tcounter" to textNumber && "of" && the number of lines in textFiles - 1
- set the fileName of cast 31 to item 1 of line 1 of photoFiles
- if item 1 of videoFiles contains "*" then
- else
- unLoadCast(32)
- set the fileName of cast 32 to item 1 of line 1 of videoFiles
- set the text of field "videoTitle" to item 2 to 3 of line videoNumber of videoFiles
- end if
- set textCast to the number of cast item 1 of line textNumber of textFiles
- set the castNum of sprite 15 to textCast
- set x to offset(controlFileName, subTopicNames)
- set i to the number of items in char 1 to x of subTopicNames
- set the castNum of sprite 8 to 17 + i
- set the text of field "credits" to item 2 to 3 of line photoNumber of photoFiles
- set the text of field "articleTitle" to item 2 to 3 of line textNumber of textFiles
- end
-
- on resetSprites
- set lastChannel to 0
- set the castNum of sprite 8 to 17
- set the castNum of sprite 10 to 3
- set the visible of sprite 15 to 0
- puppetSprite(26, 0)
- puppetSprite(28, 0)
- puppetSprite(38, 0)
- puppetSprite(44, 0)
- set the cursor of sprite 14 to 0
- if the castNum of sprite 16 = 32 then
- set the movieRate of sprite 16 to 0
- end if
- unLoadCast(32, 32)
- put "0" into word 2 of movieLocation
- end
-
- on setLink
- global subTopicNames, photoNumber, photoFiles, textNumber, currentLine, linkString, videoNumber, videoFiles, CDPath, backString, movieLocation, textFiles, OnLinePath, calPath, textCast
- if word 1 of linkString <> "hurrican" then
- cleanUp()
- set name to word 1 of linkString
- unLoadCast()
- if name = "climate" then
- go(value(word 2 of linkString), CDPath & name & "\" & name)
- else
- go(1, CDPath & name & "\" & name)
- end if
- exit
- end if
- if word 2 of linkString = "0" then
- go(3)
- exit
- end if
- set file to item value(word 2 of linkString) of subTopicNames
- setUpTypes(file)
- if word 3 of linkString = 1 then
- set photoNumber to value(word 4 of linkString)
- set the fileName of cast 31 to item 1 of line photoNumber of photoFiles
- go("photo")
- exit
- else
- if word 3 of linkString = 2 then
- set textNumber to value(word 4 of linkString)
- set currentLine to value(word 5 of linkString)
- set the text of field "articleTitle" to item 2 to 3 of line textNumber of textFiles
- set textCast to the number of cast item 1 of line textNumber of textFiles
- set the castNum of sprite 15 to textCast
- set the visible of sprite 15 to 1
- go("text")
- exit
- else
- if word 3 of linkString = 3 then
- set videoNumber to value(word 4 of linkString)
- if item 1 of videoFiles contains "*" then
- no(video)
- else
- unLoadCast(32)
- set the fileName of cast 32 to item 1 of line videoNumber of videoFiles
- set the text of field "videoTitle" to item 2 to 3 of line videoNumber of videoFiles
- end if
- go("video")
- end if
- end if
- end if
- end
-
- on clearPuppets
- puppetSprite(38, 0)
- set the visible of sprite 15 to 0
- puppetSprite(26, 0)
- puppetSprite(28, 0)
- puppetSprite(44, 0)
- end
-
- on cleanUp
- global CDPath, HDPath, calPath, OnLinePath, linkString, backString, linkFlag
- set temp1 to CDPath
- set temp2 to HDPath
- set temp3 to linkString
- set temp4 to backString
- set temp5 to calPath
- set temp6 to OnLinePath
- set temp7 to linkFlag
- clearGlobals()
- set CDPath to temp1
- set HDPath to temp2
- set linkString to temp3
- set backString to temp4
- set calPath to temp5
- set OnLinePath to temp6
- set linkFlag to temp7
- end
-