Way to see if an image is above/ontop of another image

Hello! Is there anyway to check to see if something is onto of something else... Ex. I have ball that I would like to go through a tunnel, although the ball gets stuck if it is not hit hard enough. I would like to add something that analyzes whether the ball is under something and if it is change the opacity of the image so you can see through to the ball...I think you would use alpha...

Thanks in Advance!

If your objects are in a common group, the last object added to a group is the object displayed on top. You can reorder the objects in a group to put an object on top, and thus make it visible. An alternative is to dial down the alpha setting for the tunnel and pass touch events to it.

There is also an API called object.contentBounds that give you the screen coordinates of your ball and you can determine if it's within the coordinates of the tunnel.

-David

views:1365 update:2011/11/14 9:16:56
corona forums © 2003-2011