Irregular shaped buttons redux
Judy Perry
jperryl at ecs.fullerton.edu
Fri Nov 19 15:45:46 EST 2004
Hi Scott,
Haven't tried it yet but it looks like it should work.
Many thanks!
Judy
On Fri, 19 Nov 2004, Scott Rossi wrote:
> Without knowing what you're doing, this might work:
>
> # CHECK FOR COLLISION BETWEEN BOX1 AND BOX2
> function collisionCheck obj1,obj2
> set itemDel to "|"
> put "0|0|0|0" into tPointSet
> put the topLeft of img obj1 into item 1 of tPointSet
> put the topRight of img obj1 into item 2 of tPointSet
> put the bottomLeft of img obj1 into item 3 of tPointSet
> put the bottomRight of img obj1 into item 4 of tPointSet
> repeat with N = 1 to 4
> if within(img obj2,item N of tSet) then return true
> end repeat
> return false
> end collisionCheck
>
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, Development & Design
More information about the use-livecode
mailing list