Transitioning an Image but Not a Mask in Corona SDK
I was recently playing around with image masking, and I wanted to transition the mask so that the image behind it gradually appeared on screen. Unfortunately, Corona doesn’t allow you to transition masks, but after doing a little research I learned that you can use groups to transition the image behind the mask. Here’s an example to see what I’m talking about.
https://www.youtube.com/watch?v=8DhcjrqaqO0&feature=youtu.be
In this example, I have a base image that looks like:
and a mask that looks like:
In order to move the base image and not the mask over the image, I created a new display group, placed the image inside of the group, and then masked the group instead of the image. I was then able to move the image inside of the group without moving the mask in order to achieve my desired effect. Here’s the code that I used for anybody who’s interested.
Thank you
Your comment will be published once it has been approved.
to see the pull request you generated.