Contact/ Touching images code help!

Hi It would be really helpful if any people in this forum could help me with this simple yet frusterating problem.

Im trying to make a simple program that adds a point to score only when the Red Box “touches” or comes in contact with the Pink Circle.

It would be really awesome if someone can help me with the code thanks! and have a look at the example picture and my current code for a better understanding. 

(also pinkcircle.png and redbox.png are attached)

I also have trouble with masking for circle :frowning:

       

       3KyScZ7.png

--Add Score Box score=0 ScoreBox={ text="Score:"..score, font= "Arial", fontSize=30, align= "left", } myText = display.newText(ScoreBox) myText.x=display.contentWidth/4 myText.y=display.contentWidth/6 --Add Red Box local redbox = display.newImageRect("redbox.png",40,40) redbox.x = display.contentWidth-50 redbox.y = display.contentWidth/5 --Add Pink Circle local circle = display.newImageRect("pinkcircle.png",display.contentWidth/3,display.contentWidth/3) circle.x = display.contentWidth/4 circle.y = display.contentHeight/2 --Add Red Box Movement local function a() transition.to( redbox, { alpha=1, time=1500, y=display.contentHeight/2} ) transition.to( redbox, { alpha=1, time=1500, x=display.contentWidth/4} ) end --Play Red Box Function a()

Perhaps this tutorial would help you:
 

http://coronalabs.com/blog/2013/07/23/tutorial-non-physics-collision-detection/

Perhaps this tutorial would help you:
 

http://coronalabs.com/blog/2013/07/23/tutorial-non-physics-collision-detection/