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

  1. on goToMovie moviePath
  2.   set x to the pathName
  3.   delete char the number of chars in x of x
  4.   repeat while the number of chars in x > 0
  5.     set y to char the number of chars in x of x
  6.     if the machineType = 256 then
  7.       if y = "\" then
  8.         exit repeat
  9.       end if
  10.     else
  11.       if y = ":" then
  12.         exit repeat
  13.       end if
  14.     end if
  15.     delete char the number of chars in x of x
  16.   end repeat
  17.   set theMovie to x & moviePath
  18.   go(1, theMovie)
  19. end
  20.  
  21. on goMovie theMovie, theFrame, type
  22.   if type = "label" then
  23.     go(theFrame, string(theMovie))
  24.   else
  25.     if type = "number" then
  26.       go(value(theFrame), string(theMovie))
  27.     end if
  28.   end if
  29. end
  30.  
  31. on goFrame theFrame, type
  32.   if type = "label" then
  33.     go(theFrame)
  34.   else
  35.     if value(theFrame) > 209 then
  36.       setUpSprites("16-35", 0, 0)
  37.       go(value(theFrame))
  38.       setUpSprites("16-35", 1, 1)
  39.     else
  40.       go(value(theFrame))
  41.     end if
  42.   end if
  43. end
  44.  
  45. on goNextLoc theMovie, theFrame, returnFrame
  46.   set type to checkFrameType(theFrame)
  47.   if type = "empty" then
  48.     exit
  49.   end if
  50.   logLocation(returnFrame)
  51.   if (theMovie <> EMPTY) and (string(theFrame) <> EMPTY) then
  52.     if theMovie <> the movie then
  53.       cursor(4)
  54.       goMovie(theMovie, theFrame, type)
  55.     else
  56.       goFrame(theFrame, type)
  57.     end if
  58.   else
  59.     if (theMovie <> EMPTY) and (string(theFrame) = EMPTY) then
  60.       goMovie(theMovie, 1, type)
  61.     else
  62.       if string(theFrame) <> EMPTY then
  63.         goFrame(theFrame, type)
  64.       end if
  65.     end if
  66.   end if
  67. end
  68.  
  69. on logLocation returnFrame
  70.   global browsetrail, browseNames, browseName, CR
  71.   if stringp(returnFrame) = 0 then
  72.     if integerp(returnFrame) = 0 then
  73.       set temp to marker(0) & "," & the movie
  74.     else
  75.       set temp to returnFrame & "," & the movie
  76.     end if
  77.   else
  78.     set temp to marker(returnFrame) & "," & the movie
  79.   end if
  80.   if (string(browsetrail) = EMPTY) or (string(browsetrail) = "0") then
  81.     set browsetrail to temp
  82.     set browseNames to browseName
  83.   else
  84.     if line the number of lines in browsetrail of browsetrail <> temp then
  85.       if not (browseNames contains browseName) then
  86.         if the number of lines in browsetrail <= 12 then
  87.           set browsetrail to browsetrail & CR & temp
  88.           set browseNames to browseNames & CR & browseName
  89.         else
  90.           delete line 1 of browsetrail
  91.           delete line 1 of browseNames
  92.           set browsetrail to browsetrail & CR & temp
  93.           set browseNames to browseNames & CR & browseName
  94.         end if
  95.       end if
  96.     end if
  97.   end if
  98. end
  99.  
  100. on goBack offset
  101.   global browsetrail, browseNames, articleList
  102.   if stringp(browsetrail) = 0 then
  103.     set browsetrail to EMPTY
  104.     set browseNames to EMPTY
  105.   end if
  106.   if stringp(offset) = 0 then
  107.     set offset to 0
  108.   end if
  109.   if string(browsetrail) <> EMPTY then
  110.     set theTarget to line the number of lines in browsetrail of browsetrail
  111.     if articleList contains item 2 of theTarget then
  112.       if the number of lines in browsetrail > 1 then
  113.         delete line the number of lines in browsetrail of browsetrail
  114.         delete line the number of lines in browseNames of browseNames
  115.       else
  116.         set browsetrail to EMPTY
  117.         set browseNames to EMPTY
  118.       end if
  119.       set theFrame to item 1 of theTarget
  120.       set theMovie to item 2 of theTarget
  121.       if theMovie <> the movie then
  122.         go(value(theFrame) + offset, theMovie)
  123.       else
  124.         if theFrame <> the frame then
  125.           go(value(theFrame) + offset)
  126.         end if
  127.       end if
  128.     end if
  129.   else
  130.     beep()
  131.   end if
  132. end
  133.