home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 August / WPCAUG96.ISO / makers / search.dir / 00031.ls < prev    next >
Encoding:
Text File  |  1996-06-12  |  2.0 KB  |  57 lines

  1. on mouseDown
  2.   global Chapter, Sub, LastLine, ThisSubChapter, LastSubLine, SavedNum
  3.   set theLine to the mouseLine
  4.   if theLine <> -1 then
  5.     if LastLine <> EMPTY then
  6.       set dif to LastLine - 20
  7.     else
  8.       set dif to 0
  9.     end if
  10.     set the foreColor of field the castNum of sprite the clickOn to 1
  11.     set the foreColor of line theLine of field the castNum of sprite the clickOn to 201
  12.     set the itemDelimiter to "@"
  13.     if Chapter <> 7 then
  14.       set Sub to theLine + dif
  15.       set xx to item Sub of field (Chapter && "sub")
  16.       set SavedNum to item Sub of field (Chapter && "go")
  17.     else
  18.       if value(line theLine of field the castNum of sprite the clickOn) < 1952 then
  19.         set Sub to theLine + dif
  20.         set xx to item Sub of field (Chapter && "sub A")
  21.         set SavedNum to item Sub of field (Chapter && "go")
  22.       else
  23.         set Sub to theLine + dif - 51
  24.         set xx to item Sub of field (Chapter && "sub B")
  25.         set SavedNum to item theLine + dif of field (Chapter && "go")
  26.       end if
  27.     end if
  28.     if line the number of lines in xx of xx = EMPTY then
  29.       delete line the number of lines in xx of xx
  30.     end if
  31.     set ThisSubChapter to xx
  32.     if the number of lines in xx > 20 then
  33.       set LastSubLine to 20
  34.     else
  35.       set LastSubLine to 0
  36.     end if
  37.     set the visible of sprite 11 to 0
  38.     put line 1 to 20 of xx into field "subSubList"
  39.     set temp to item Chapter of field "GreenSquarSize"
  40.     set the width of sprite 10 to value(line Sub of temp)
  41.     set the height of sprite 10 to the number of lines in field "subSubList" * 16
  42.     set the locH of sprite 10 to the right of sprite 13 + 20
  43.     set the locH of sprite 11 to the right of sprite 13 + 20
  44.     updateStage()
  45.     set the visible of sprite 11 to 1
  46.     if LastSubLine = 0 then
  47.       if the locH of sprite 17 < 1000 then
  48.         set the locH of sprite 17 to the locH of sprite 17 + 1000
  49.         set the locH of sprite 18 to the locH of sprite 17
  50.       end if
  51.     else
  52.       placeArrow(10, 17)
  53.     end if
  54.     set the itemDelimiter to ","
  55.   end if
  56. end
  57.