home *** CD-ROM | disk | FTP | other *** search
- on inCastRegion textCast
- global CR, platForm
- if string(textCast) = EMPTY then
- exit
- end if
- set areaList to EMPTY
- set areaList to the text of cast textCast
- set x to the mouseH
- set y to the mouseV
- if the machineType = 256 then
- set n to PCinRect(x, y, areaList)
- else
- InRect(x, y, areaList)
- set n to the result
- end if
- set n to value(n)
- if n > 0 then
- set m to line n of areaList & CR & n
- return m
- else
- return EMPTY
- end if
- end
-
- on inRelCastRegion textCast
- global CR, platForm
- if string(textCast) = EMPTY then
- exit
- end if
- set me to clickOn()
- set LT to the left of sprite me
- set TP to the top of sprite me
- set areaList to EMPTY
- set areaList to the text of cast textCast
- set x to the mouseH - LT
- set y to the mouseV - TP
- if the machineType = 256 then
- set n to PCinRect(x, y, areaList)
- else
- InRect(x, y, areaList)
- set n to the result
- end if
- set n to value(n)
- if n > 0 then
- set m to line n of areaList & CR & n
- return m
- else
- return EMPTY
- end if
- end
-
- on inRelCastRegionR spriteNum, textCast
- global CR, platForm
- if string(textCast) = EMPTY then
- exit
- end if
- set LT to the left of sprite spriteNum
- set TP to the top of sprite spriteNum
- set areaList to EMPTY
- set areaList to the text of cast textCast
- set areaList to removeComments(areaList)
- set x to the mouseH - LT
- set y to the mouseV - TP
- if the machineType = 256 then
- set n to PCinRect(x, y, areaList)
- else
- InRect(x, y, areaList)
- set n to the result
- end if
- set n to value(n)
- if n > 0 then
- set m to line n of areaList & CR & n
- return m
- else
- return EMPTY
- end if
- end
-
- on PCinRect x, y, areaList
- global CR
- set k to EMPTY
- set m to the number of lines in areaList
- repeat with n = 1 to m
- set theRect to line n of areaList
- if char 1 of theRect = "-" then
- next repeat
- end if
- set x1 to value(item 1 of theRect)
- set y1 to value(item 2 of theRect)
- set x2 to value(item 3 of theRect)
- set y2 to value(item 4 of theRect)
- if (x >= x1) and (x <= x2) then
- if (y >= y1) and (y <= y2) then
- set k to n
- end if
- end if
- end repeat
- return k
- end
-
- on getRegionPtr textCast
- global CR
- if string(textCast) = EMPTY then
- exit
- end if
- set areaList to EMPTY
- set areaList to the text of cast textCast
- set x to the mouseH
- set y to the mouseV
- InRect(x, y, areaList)
- set n to the result
- set n to value(n)
- if n > 0 then
- return n
- else
- return EMPTY
- end if
- end
-
- on inBtnRegion textCast
- global CR
- if string(textCast) = EMPTY then
- exit
- end if
- set areaList to EMPTY
- set areaList to the text of cast textCast
- set areaList to removeComments(areaList)
- set x to the mouseH
- set y to the mouseV
- InRect(x, y, areaList)
- set n to the result
- set n to value(n)
- if n > 0 then
- set m to line n of areaList
- return m
- else
- return EMPTY
- end if
- end
-
- on stillInRect theRect
- global CR
- set x to the mouseH
- set y to the mouseV
- InRect(x, y, theRect & CR)
- set n to the result
- set n to value(n)
- if n > 0 then
- return 1
- else
- return 0
- end if
- end
-