home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global noteData, notePages, currPage, castData
- if castData contains "popmenu" then
- managePopMenu()
- end if
- if value(item 2 of castData) > 1000 then
- exit
- end if
- moveWindow("6", marker(0))
- if (the right of sprite 6 - the mouseH) < 23 then
- if (the bottom of sprite 6 - the mouseV) < 23 then
- if currPage < notePages then
- set the castNum of sprite 6 to value(item 1 of noteData) + currPage
- set currPage to currPage + 1
- end if
- end if
- else
- if (the right of sprite 6 - the mouseH) < 46 then
- if (the bottom of sprite 6 - the mouseV) < 46 then
- if currPage > 1 then
- set currPage to currPage - 1
- set the castNum of sprite 6 to value(item 1 of noteData) + currPage - 1
- end if
- end if
- set the ink of sprite 6 to 36
- end if
- end if
- end
-
- on managePopMenu
- global castData, rectList
- set baseCastNum to value(item 4 of castData)
- set mItems to value(item 5 of castData)
- set LT to value(getAt(rectList, 1))
- set TP to value(getAt(rectList, 2))
- set rt to LT + value(getAt(rectList, 3))
- set bt to TP + value(getAt(rectList, 4))
- set castPtr to 0
- repeat while the mouseDown
- set x to the mouseH
- set y to the mouseV
- if (x >= LT) and (x <= rt) then
- if (y >= TP) and (y <= bt) then
- set castPtr to integer(0.5 + ((y - TP) * mItems * 1.0 / (bt - TP)))
- set the castNum of sprite 6 to baseCastNum + castPtr
- updateStage()
- next repeat
- end if
- set castPtr to 0
- set the castNum of sprite 6 to baseCastNum
- updateStage()
- end if
- set castPtr to 0
- set the castNum of sprite 6 to baseCastNum
- updateStage()
- end repeat
- if castPtr = 3 then
- set castData to "1,99"
- puppetSprite(6, 0)
- puppetSprite(16, 1)
- set the castNum of sprite 16 to 90
- set the ink of sprite 16 to 36
- spriteBox(16, 168, 190, 532, 304)
- end if
- end
-