home *** CD-ROM | disk | FTP | other *** search
- on GetareaList spriteRange, theCastNum
- global areaList, CR
- set start to string(item 1 of spriteRange)
- set finish to string(item 2 of spriteRange)
- set areaList to EMPTY
- repeat with n = value(start) to value(finish)
- set theLine to the left of sprite n & "," & the top of sprite n & "," & the right of sprite n & "," & the bottom of sprite n
- if areaList = EMPTY then
- set areaList to theLine & "," & 1 & ","
- next repeat
- end if
- set areaList to areaList & RETURN & theLine & "," & 1 & ","
- end repeat
- if integerp(theCastNum) then
- set x to the text of cast theCastNum
- if stringp(x) then
- set the text of cast theCastNum to x & RETURN & areaList
- else
- set the text of cast theCastNum to areaList
- end if
- else
- put RETURN & areaList & RETURN
- end if
- end
-
- on GetOffsetList winSprite, spriteRange, theCastNum
- global areaList, CR
- set TP to the top of sprite winSprite
- set LT to the left of sprite winSprite
- set start to string(item 1 of spriteRange)
- set finish to string(item 2 of spriteRange)
- set areaList to EMPTY
- repeat with n = value(start) to value(finish)
- set theLine to the left of sprite n - LT & "," & the top of sprite n - TP & "," & the right of sprite n - LT & "," & the bottom of sprite n - TP
- if areaList = EMPTY then
- set areaList to theLine & "," & 1 & ","
- next repeat
- end if
- set areaList to areaList & RETURN & theLine & "," & 1 & ","
- end repeat
- if integerp(theCastNum) then
- set x to the text of cast theCastNum
- if stringp(x) then
- set the text of cast theCastNum to x & RETURN & areaList
- else
- set the text of cast theCastNum to areaList
- end if
- else
- put RETURN & areaList & RETURN
- end if
- end
-
- on setShadow me, shadWd
- global CR
- set theCast to the castNum of sprite me
- if string(theCast) = 0 then
- put "No cast in sprite channel" && me
- beep()
- exit
- end if
- set l to value(shadWd) + the left of sprite me
- set r to value(shadWd) + the right of sprite me
- set t to value(shadWd) + the top of sprite me
- set b to value(shadWd) + the bottom of sprite me
- put CR & "left" && l & CR & "top" && t & CR & "width" && r - l + 1 & CR & "height" && b - t + 1
- end
-