home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / winprogs / childenc / oecdemo / shared.dir / 00579.ls < prev    next >
Encoding:
Text File  |  1996-07-24  |  2.3 KB  |  91 lines

  1. on showNotes
  2.   global castData, noteData, notePages, currPage, keyHotspots
  3.   setUpSprites("6-7", 1, 1)
  4.   set theCastNum to value(item 2 of castData)
  5.   if theCastNum < 1000 then
  6.     set the castNum of sprite 6 to the number of cast theCastNum
  7.   else
  8.     set theCmd to item 3 of castData
  9.     set theParam1 to item 4 of castData
  10.     set theParam2 to item 5 of castData
  11.     if the soundBusy of 1 then
  12.       stopSound(1, 10)
  13.     else
  14.       do(theCmd && QUOTE & theParam1 & QUOTE & "," & theParam2)
  15.     end if
  16.     exit
  17.   end if
  18.   set notePages to value(item 3 of castData)
  19.   set x1 to value(item 4 of castData)
  20.   set y1 to value(item 5 of castData)
  21.   set x2 to value(item 6 of castData)
  22.   set y2 to value(item 7 of castData)
  23.   spriteBox(6, x1, y1, x2, y2)
  24.   repeat with n = 1 to the number of lines in keyHotspots
  25.     if line n of keyHotspots contains item 1 of castData then
  26.       set noteData to line n of keyHotspots
  27.       exit repeat
  28.     end if
  29.   end repeat
  30.   delete item 1 to 6 of noteData
  31.   set currPage to 1
  32.   set the ink of sprite 6 to 36
  33. end
  34.  
  35. on goNextPage whichWay
  36.   global markerlist
  37.   unLoadCast(the castNum of sprite 2)
  38.   set x to marker(0)
  39.   set t to the number of lines in markerlist
  40.   repeat with n = 1 to t
  41.     if x = line n of markerlist then
  42.       set j to n + whichWay
  43.       if j > t then
  44.         exit
  45.       else
  46.         if j < 1 then
  47.           exit
  48.         end if
  49.       end if
  50.       set theFrame to line j of markerlist
  51.       exit repeat
  52.     end if
  53.   end repeat
  54.   setUpSprites("5-8;10-12;37-48", 0)
  55.   goNextLoc(the movie, theFrame, marker(0))
  56.   if the soundBusy of 1 then
  57.     stopSound(1, 10)
  58.   end if
  59. end
  60.  
  61. on goToArticle incORdec
  62.   global articleList
  63.   unLoadCast(1, 100)
  64.   set moviePtr to 0
  65.   set x to the number of lines in articleList
  66.   set y to the number of items in line 1 of articleList
  67.   repeat with n = 1 to x
  68.     if the movie = item y of line n of articleList then
  69.       set moviePtr to n
  70.       exit repeat
  71.     end if
  72.   end repeat
  73.   put moviePtr
  74.   if moviePtr > 0 then
  75.     set moviePtr to n + incORdec
  76.     if moviePtr <= 0 then
  77.       set moviePtr to x
  78.     else
  79.       if moviePtr > x then
  80.         set moviePtr to 1
  81.       end if
  82.     end if
  83.     set destMovie to item y of line moviePtr of articleList
  84.     setUpSprites("6-8;10-12;37-48", 0)
  85.     goNextLoc(destMovie, 1, marker(0))
  86.     if the soundBusy of 1 then
  87.       stopSound(1, 10)
  88.     end if
  89.   end if
  90. end
  91.