Masks do nto work on imagesheets?

I followed all the mask tutorials I could find here on the site, and even tried copy and pasting stuff from the flashlight (even the mask file itself), but it do not work, nothing happen actually…

Is it because the Object file I am using is always created using a ImageSheet? (ie: display.newImage( group, imagesheet, frameindex) [import]uid: 142895 topic_id: 28489 reply_id: 328489[/import]

I made a test… Cutting my own proprietary game logic, it is this:

[lua]function scene:createScene( event )
local group = self.view

local maskara = graphics.newMask(“circlemask.png”);

local bgImage = display.newImageRect( group, “camera-background.png”, 512, 384 );
bgImage.x = display.contentWidth/2;
bgImage.y = display.contentHeight/2;
bgImage:setMask( maskara );
–the first versions were done without the four following lines
bgImage.maskScaleX = 1; --other values got tried here
bgImage.maskScaleY = 1; --other values got tried here
bgImage.maskX = 50; --other values got tried here
bgImage.maskY = 50; --other values got tried here
end[/lua]

This just shows camerabackground.png and nothing else happens to it, nothing is hidden at all… [import]uid: 142895 topic_id: 28489 reply_id: 114966[/import]

It would help to see your mask/run the project - maybe you could upload a simple project someone could check out? [import]uid: 52491 topic_id: 28489 reply_id: 115045[/import]

The “circlemask” I copied from the flashlight example.

Also I tried to apply the mask to the whole scene group…

Interestingly, that group has a touch listener, that obeyed the mask, yet visually nothing changed…

If I turn off the touch masking, I can touch the group entirely, if I leave it on, I can only touch where the mask allows…

But I can do whatever I want with the mask transforms or where I apply it, that nothing happen (I also tested applying the mask to a normal image).

Since the samples work, I guess SOMETHING in my project is preventing the masks of working, but I dunno what. [import]uid: 142895 topic_id: 28489 reply_id: 115064[/import]

Would you be able to upload a sample somewhere and post a download link here? You’re right that the samples work and it must be something in your project, so if you can put a sample up maybe someone could help you figure that out. [import]uid: 52491 topic_id: 28489 reply_id: 115110[/import]