home *** CD-ROM | disk | FTP | other *** search
/ American History: Interactive Maps & User's Guide / American History: Interactive Maps & User's Guide.iso / pc / TIMESCPE.dxr / 00162.ls < prev    next >
Encoding:
Text File  |  2000-01-25  |  10.3 KB  |  282 lines

  1. on startMovie
  2.   global gEdgeCheck, gStop, gSplit, gChapter
  3.   case gSplit of
  4.     1, 4:
  5.       set gChapter to 1
  6.     2, 3:
  7.       set gChapter to 13
  8.   end case
  9.   set gEdgeCheck to 0
  10.   set gStop to 0
  11.   set the searchPath to [the pathName & "Xtras"]
  12. end
  13.  
  14. on initDataGlobals
  15.   global gLogonCount, gGPAttempts, gGP100, gAppAttempted, gMasteryList, gBookMarkUsed, gDataPath, gFileName, gFolderName, gInText, gOutText, gBookMark, gGPPageNumber, gClassList, gClassPointer, gClassTable, gClassNameTable, gClassSelector, gHallOfFameFlag, gRosterID, gRosterTable, gSkillTable, gPassword, gRosterList, gAppUpdateFlag, gDatabaseExists, gTeacherLoggedOn, gTeacherCD, gStudentKey, gStudentList, gStudentTable, gStudentNameTable, gStudentSelector, gInitPath, gFindList, gLogonVisible, gClassFloat, gClassCount, gBullets, gDelimiter, gTeacherFlag
  16.   set gFolderName to "eapinit.ctx"
  17.   set gFileName to "eap.ini"
  18.   if readText(gInitPath) <> 0 then
  19.     return -1
  20.     exit
  21.   end if
  22.   set databaseString to line 1 of gInText
  23.   set gDatabaseExists to integer(databaseString)
  24.   if gTeacherCD = 1 then
  25.     case gDatabaseExists of
  26.       0:
  27.         if the platform contains "Windows" then
  28.           set gDataPath to "A:"
  29.         else
  30.           set gDataPath to floppyName()
  31.         end if
  32.         set floppyfoundflag to verifyFloppy(gDataPath & gDelimiter, 0)
  33.         if floppyfoundflag = 1 then
  34.           set gDataPath to gDataPath & gDelimiter & "EAPScore" & gDelimiter
  35.           set floppyfoundflag to verifyFloppy(gDataPath & "Class" & gDelimiter & "Token", 1)
  36.         end if
  37.       1:
  38.         set gDataPath to line 2 of gInText & "eapscore" & gDelimiter
  39.     end case
  40.     set gFolderName to "Class"
  41.     set gFileName to "Token"
  42.     readText(gDataPath)
  43.     if readText(gDataPath) <> 0 then
  44.       return -2
  45.     end if
  46.     set classToken to EMPTY
  47.     set tokenLine to gInText
  48.     do("set classToken = " & tokenLine)
  49.     set gClassFloat to integer(getAt(classToken, 1))
  50.     set gClassCount to integer(getAt(classToken, 2))
  51.     if gClassCount = 0 then
  52.       set gTeacherFlag to 1
  53.       set gClassNameTable to EMPTY
  54.       InitSections()
  55.       go("IF")
  56.       exit
  57.     end if
  58.   end if
  59.   set gLogonCount to 0
  60.   set gGPAttempts to 0
  61.   set gAppAttempted to 0
  62.   set gGP100 to 0
  63.   set gRosterTable to EMPTY
  64.   set gRosterID to EMPTY
  65.   set gRosterList to EMPTY
  66.   set gClassTable to EMPTY
  67.   set gClassList to EMPTY
  68.   set gStudentKey to EMPTY
  69.   set gClassPointer to 0
  70.   set gStudentSelector to 0
  71.   set gClassSelector to 1
  72.   set the text of member "classWindow" to EMPTY
  73.   set gHallOfFameFlag to "Y"
  74.   set gTeacherLoggedOn to 0
  75.   set gBullets to "ΓÇóΓÇóΓÇóΓÇóΓÇóΓÇóΓÇóΓÇó"
  76.   set gBookMark to EMPTY
  77.   set gGPPageNumber to EMPTY
  78.   set gBookMarkUsed to 0
  79.   set the text of member "displayClass" to " "
  80.   set the text of member "displayTeacher" to " "
  81.   set the text of member "messageWindow" to " "
  82.   set the text of member "showStudent" to " "
  83.   set the text of member "classWindow" to " "
  84.   set the text of member "studentWindow" to " "
  85.   set standardFont to the textFont of member "fontHolder"
  86.   set the textFont of member "displayClass" to standardFont
  87.   set the textFont of member "displayTeacher" to standardFont
  88.   set the textFont of member "messageWindow" to standardFont
  89.   set the textFont of member "showStudent" to standardFont
  90.   set the textFont of member "classWindow" to standardFont
  91.   set the textFont of member "studentWindow" to standardFont
  92.   set standardSize to the textSize of member "fontHolder"
  93.   set the textSize of member "displayClass" to standardSize
  94.   set the textSize of member "displayTeacher" to standardSize
  95.   set the textSize of member "messageWindow" to standardSize
  96.   set the textSize of member "showStudent" to standardSize
  97.   set the textSize of member "classWindow" to standardSize
  98.   set the textSize of member "studentWindow" to standardSize
  99.   set the textStyle of member "displayClass" to "plain"
  100.   set the textStyle of member "displayTeacher" to "plain"
  101.   set the textStyle of member "messageWindow" to "plain"
  102.   set the textStyle of member "showStudent" to "plain"
  103.   set the textStyle of member "classWindow" to "plain"
  104.   set the textStyle of member "studentWindow" to "plain"
  105.   set the text of member "displayClass" to EMPTY
  106.   set the text of member "displayTeacher" to EMPTY
  107.   set the text of member "showStudent" to EMPTY
  108.   set the text of member "classWindow" to EMPTY
  109.   set the text of member "studentWindow" to EMPTY
  110.   go("IF")
  111. end
  112.  
  113. on stopMovie
  114.   set the text of member "classWindow" to EMPTY
  115. end
  116.  
  117. on playSoundFile SoundFileName
  118.   global PathToStuf, fdelelimiter
  119.   set filePath to PathToStuf & "Sounds:" & SoundFileName
  120.   sound playFile 1, filePath
  121. end
  122.  
  123. on CleanUpTextHandlers
  124.   global allSpritesList, gComponentsList, gMenusList, gMainMembersList, gDisplayMembersList, gLanguage
  125.   TextTurnOffPuppets()
  126.   TextTurnOnVisibles(allSpritesList)
  127.   set gComponentsList to []
  128.   set gMenusList to []
  129.   set gMainMembersList to []
  130.   set gDisplayMembersList to []
  131.   set gLanguage to "E"
  132. end
  133.  
  134. on hHotRect vWhichSprite, vWhat, vSubtract, vHeight, vWidth, vPoint
  135.   set the castNum of sprite vWhichSprite to the number of member vWhat
  136.   set the locH of sprite vWhichSprite to the locH of sprite 1 - vSubtract
  137.   set the height of sprite vWhichSprite to vHeight
  138.   set the width of sprite vWhichSprite to vWidth
  139.   set the locV of sprite vWhichSprite to vPoint
  140. end
  141.  
  142. on hRolCheck vWhichSprite1, vWhichSprite2, vWhichSprite3, vWhichSprite4, vSubtract, vVertical, vRolWhat1, vRolWhat2
  143.   global gEdgeCheck
  144.   if (the mouseH < 55) or (the mouseH > 586) then
  145.     if rollOver(5) then
  146.       set gEdgeCheck to 1
  147.     else
  148.       if rollOver(4) then
  149.         set gEdgeCheck to 2
  150.       end if
  151.     end if
  152.   end if
  153.   if (the mouseH < 55) or (the mouseH > 586) then
  154.     if gEdgeCheck = 1 then
  155.       set the locH of sprite 5 to 9999
  156.     else
  157.       if gEdgeCheck = 2 then
  158.         set the locH of sprite 4 to 9999
  159.       end if
  160.     end if
  161.   end if
  162.   if rollOver(vWhichSprite1) then
  163.     if the castNum of sprite 46 <> the number of member "scrollbar ball.hand" then
  164.       set the castNum of sprite vWhichSprite2 to the number of member vRolWhat1
  165.       set vRolPoint to the locH of sprite 1 - vSubtract
  166.       set the loc of sprite vWhichSprite2 to point(vRolPoint, vVertical)
  167.       set the castNum of sprite vWhichSprite3 to the number of member vRolWhat2
  168.       set the loc of sprite vWhichSprite3 to point(321, 368)
  169.       set the castNum of sprite vWhichSprite4 to the number of member "pixel"
  170.       hFingerCheck(vWhichSprite1, "finger", "finger mask")
  171.     end if
  172.   else
  173.     if sprite vWhichSprite1 within 8 then
  174.       if (rollOver(4) <> 1) and (rollOver(5) <> 1) then
  175.         set the castNum of sprite vWhichSprite3 to the number of member vRolWhat2
  176.         set the loc of sprite vWhichSprite3 to point(321, 368)
  177.         set the castNum of sprite vWhichSprite2 to the number of member "pixel"
  178.       end if
  179.     else
  180.       set the castNum of sprite vWhichSprite3 to the number of member "pixel"
  181.       set the castNum of sprite vWhichSprite2 to the number of member "pixel"
  182.     end if
  183.   end if
  184. end
  185.  
  186. on hMenuCheck vSprite, vIcon, vChapterA, vChapterB, vChapterC, vChapterD
  187.   if the castNum of sprite vSprite = the number of member vIcon then
  188.     set the castNum of sprite 39 to the number of member "menu"
  189.     set the loc of sprite 39 to point(320, 240)
  190.     set the castNum of sprite 40 to the number of member vChapterA
  191.     set the loc of sprite 40 to point(320, 240)
  192.     set the castNum of sprite 41 to the number of member vChapterB
  193.     set the loc of sprite 41 to point(320, 240)
  194.     set the castNum of sprite 42 to the number of member vChapterC
  195.     set the loc of sprite 42 to point(320, 240)
  196.     set the castNum of sprite 43 to the number of member vChapterD
  197.     set the loc of sprite 43 to point(320, 240)
  198.   end if
  199. end
  200.  
  201. on hMenuRoll vSprite, vItem1, vItem2, vRect
  202.   if inside(point(the mouseH, the mouseV), vRect) then
  203.     set the castNum of sprite vSprite to the number of member vItem1
  204.   else
  205.     set the castNum of sprite vSprite to the number of member vItem2
  206.   end if
  207. end
  208.  
  209. on hCheckButtons
  210.   if the castNum of sprite 46 <> the number of member "scrollbar ball.hand" then
  211.     if inside(point(the mouseH, the mouseV), rect(258, 59, 378, 81)) then
  212.       set the castNum of sprite 47 to the number of member "guideTour.green"
  213.       hFingerCheck(47, "finger", "finger mask")
  214.     else
  215.       if inside(point(the mouseH, the mouseV), rect(258, 80, 378, 102)) then
  216.         set the castNum of sprite 47 to the number of member "credit.green"
  217.         hFingerCheck(47, "finger", "finger mask")
  218.       else
  219.         if inside(point(the mouseH, the mouseV), rect(531, 443, 622, 478)) then
  220.           set the castNum of sprite 47 to the number of member "directions.glow"
  221.           hFingerCheck(47, "finger", "finger mask")
  222.         else
  223.           set the castNum of sprite 47 to the number of member "pixel"
  224.         end if
  225.       end if
  226.     end if
  227.   end if
  228. end
  229.  
  230. on hPositionSet
  231.   if the castNum of sprite 39 = the number of member "pixel" then
  232.     set the constraint of sprite 46 to 7
  233.   end if
  234.   set the locV of sprite 1 to 240
  235.   if the locH of sprite 46 < 85 then
  236.     set the locH of sprite 46 to 85
  237.   end if
  238.   if the locH of sprite 46 > 555 then
  239.     set the locH of sprite 46 to 555
  240.   end if
  241. end
  242.  
  243. on hScrollCheck
  244.   global gStop
  245.   if (rollOver(46) = 0) and the mouseUp then
  246.     set the castNum of sprite 46 to the number of member "scrollbar ball"
  247.     set gStop to the locH of sprite 46
  248.     cursor(-1)
  249.   end if
  250.   if rollOver(46) then
  251.     if the castNum of sprite 39 <> the number of member "menu" then
  252.       set the castNum of sprite 46 to the number of member "scrollbar ball.hand"
  253.       set gStop to the locH of sprite 46
  254.       cursor(200)
  255.     end if
  256.   end if
  257.   if the castNum of sprite 39 <> the number of member "pixel" then
  258.     set the castNum of sprite 46 to the number of member "scrollbar ball"
  259.     set the locH of sprite 46 to gStop
  260.     set the moveableSprite of sprite 46 to 0
  261.   else
  262.     set the moveableSprite of sprite 46 to 1
  263.   end if
  264.   if the castNum of sprite 39 <> the number of member "pixel" then
  265.     if inside(point(the mouseH, the mouseV), rect(174, 125, 466, 226)) then
  266.       hFingerCheck(39, "finger", "finger mask")
  267.     end if
  268.   end if
  269. end
  270.  
  271. on hFingerCheck vSprite, vWhich, vWhichMask
  272.   set FingerCursor to [the memberNum of member vWhich, the memberNum of member vWhichMask]
  273.   set the cursor of sprite vSprite to FingerCursor
  274. end
  275.  
  276. on hChapter
  277.   repeat with i = 1 to 48
  278.     set the castNum of sprite i to the number of member "pixel"
  279.   end repeat
  280.   go("TimescapeCleanUp")
  281. end
  282.