I am running of the following code (with slide edits). I am basically applying mask on a displayGroup, which in-turn contains a subgroup with a newImageRect() and a newRect(); The newRect() shows up correctly, but the newImageRect() dosen’t show up at all.
Just to make sure I am not crazy, if I don’t apply the mask, the newImageRect() and newRect() both show up correctly. Can someone help? Did I step unto a bug?
[code]
displayObj = display.newGroup();
objGroup = display.newGroup();
displayObj:insert (objGroup);
– Set a viewable window that is smaller then tho entire screen width
local imag = display.newImageRect(“images/space_iap_observatory.png”, 240, 160);
imag:setReferencePoint(display.CenterReferencePoint);
imag.x = 0;
imag.y = 0;
objGroup:insert (imag);
local target = display.newRect (0,0,10,10);
target:setReferencePoint(display.CenterReferencePoint);
target.x = 0;
target.y = 0;
target:setFillColor(255,0,0);
– displayObj:insert (target);
objGroup:insert (target);
if (windowHeight) and (windowWidth) then
windowMask = graphics.newMask(“images/SquareMask.jpg”);
displayObj:setMask(windowMask);
displayObj.maskScaleX = windowWidth / 64;
displayObj.maskScaleY = windowHeight / 64;
displayObj.maskX = 0;
displayObj.maskY = 0;
displayObj.isHitTestMasked = false;
end
[/code] [import]uid: 41124 topic_id: 29546 reply_id: 329546[/import]