Issue with masks - flashlight sample code

Im trying to create a scene within my app where there is a dark room and what looks like a monster hiding in the corner. The user drags a flashlight across the screen to reveal that the monster is really a lamp etc. Im trying to get this effect using the corona flashlight sample code. However, I am wondering if there is any way to place a mask over two images. The mask in the sample code is just a circle surrounded by black but I want my top image to be an image of the dark room with the image to be revealed underneath. 

Its a little difficult to explain so I hope this makes sense. :confused: Is there any way to do this?

Opps, nevermind, I tried to do it in a test project and it seemed to work there. Not in my main project though so I must have another problem somewhere not a masking problem :confused:

I was going to answer.  Put the images in the same group, then mask the group.  Of course, the end solution may be more complicated that this.  You can also consider custom shaders.

-ed

Great, thanks ed! Currently, my images are all slightly transparent after masking just one image so you can see each image beneath. I’ll give masking the group a go and see if that helps. I have no experience with custom shaders but I’ll definitely look into them.

Thanks again!

Opps, nevermind, I tried to do it in a test project and it seemed to work there. Not in my main project though so I must have another problem somewhere not a masking problem :confused:

I was going to answer.  Put the images in the same group, then mask the group.  Of course, the end solution may be more complicated that this.  You can also consider custom shaders.

-ed

Great, thanks ed! Currently, my images are all slightly transparent after masking just one image so you can see each image beneath. I’ll give masking the group a go and see if that helps. I have no experience with custom shaders but I’ll definitely look into them.

Thanks again!