| Subject: | Re: One object inside another |
|---|---|
| From: | Mike Blaustein |
| Date: | Sun, 15 Jun 2008 21:11:27 -0400 |
| Newsgroups: | macromedia.director.lingo |
Check out the intersect() command in the help. It will tell you if one rect intersects another, and it will tell you the rect of the intersection. if sprite(1).rect.intersect(sprite(2).rect)>rect(0,0,0,0) then --there is some intersection end if if sprite(1).rect.intersect(sprite(2).rect)=sprite(1).rect then --sprite 1 is ENTIRELY inside of sprite 2 end if if sprite(1).rect.intersect(sprite(2).rect)=sprite(2).rect then --sprite 2 is ENTIRELY inside of sprite 1 end if |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | One object inside another, bmohnsen |
|---|---|
| Next by Date: | Re: One object inside another, alchemist |
| Previous by Thread: | One object inside another, bmohnsen |
| Next by Thread: | Re: One object inside another, alchemist |
| Indexes: | [Date] [Thread] [Top] [All Lists] |