home *** CD-ROM | disk | FTP | other *** search
- on getButtonData buttonName, nextAction, offsetDist
- if voidp(offsetDist) then
- set offsetDist to [0, 0]
- end if
- set whichRegPoint to point(320 + getAt(offsetDist, 1), 240 + getAt(offsetDist, 2))
- set nextRect to getButtonRect(buttonName, whichRegPoint, offsetDist)
- set rolloverButton to 0
- set regionList to [duplicate(nextRect), whichRegPoint, rolloverButton, the number of member buttonName, nextAction]
- return regionList
- end
-
- on getButtonRect whichMember, whichRegPoint, offsetDist
- if voidp(whichRegPoint) then
- set whichRegPoint to point(320, 240)
- end if
- set nextMemNumber to the number of member whichMember
- set nextRegPoint to the regPoint of cast nextMemNumber
- set nextWidth to the width of cast nextMemNumber
- set nextHeight to the height of cast nextMemNumber
- set centerH to getAt(nextRegPoint, 1)
- set centerV to getAt(nextRegPoint, 2)
- set leftH to getAt(whichRegPoint, 1) - centerH
- set rightH to leftH + nextWidth
- set topV to getAt(whichRegPoint, 2) - centerV
- set bottomV to topV + nextHeight
- set theRect to rect(leftH, topV, rightH, bottomV)
- return theRect
- end
-