home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global Chapter, Sub, LastLine, ThisSubChapter, LastSubLine, SavedNum
- set theLine to the mouseLine
- if theLine <> -1 then
- if LastLine <> EMPTY then
- set dif to LastLine - 20
- else
- set dif to 0
- end if
- set the foreColor of field the castNum of sprite the clickOn to 1
- set the foreColor of line theLine of field the castNum of sprite the clickOn to 201
- set the itemDelimiter to "@"
- if Chapter <> 7 then
- set Sub to theLine + dif
- set xx to item Sub of field (Chapter && "sub")
- set SavedNum to item Sub of field (Chapter && "go")
- else
- if value(line theLine of field the castNum of sprite the clickOn) < 1952 then
- set Sub to theLine + dif
- set xx to item Sub of field (Chapter && "sub A")
- set SavedNum to item Sub of field (Chapter && "go")
- else
- set Sub to theLine + dif - 51
- set xx to item Sub of field (Chapter && "sub B")
- set SavedNum to item theLine + dif of field (Chapter && "go")
- end if
- end if
- if line the number of lines in xx of xx = EMPTY then
- delete line the number of lines in xx of xx
- end if
- set ThisSubChapter to xx
- if the number of lines in xx > 20 then
- set LastSubLine to 20
- else
- set LastSubLine to 0
- end if
- set the visible of sprite 11 to 0
- put line 1 to 20 of xx into field "subSubList"
- set temp to item Chapter of field "GreenSquarSize"
- set the width of sprite 10 to value(line Sub of temp)
- set the height of sprite 10 to the number of lines in field "subSubList" * 16
- set the locH of sprite 10 to the right of sprite 13 + 20
- set the locH of sprite 11 to the right of sprite 13 + 20
- updateStage()
- set the visible of sprite 11 to 1
- if LastSubLine = 0 then
- if the locH of sprite 17 < 1000 then
- set the locH of sprite 17 to the locH of sprite 17 + 1000
- set the locH of sprite 18 to the locH of sprite 17
- end if
- else
- placeArrow(10, 17)
- end if
- set the itemDelimiter to ","
- end if
- end
-