Hi all,
I’m trying to tint a collection of DisplayObjects to gray in one go, so I’m logically trying to call setFillColor() on the group they belong to, but it’s not working. Here’s the simple test code I’m using:
local gg = display.newGroup();
local a = display.newImage(gg, “image.png”, true);
a.x = display.contentCenterX;
a.y = display.contentCenterY;
gg:insert(a);
Now, that works exactly as expected, my image is on the screen. So, next I do:
gg:setFillColor(0.5);
That throws an exception:
attempt to call method ‘setFillColor’ (a nil value)
I also tried calling the method directly on the image:
a:setFillColor(0.5);
…and that works exactly as expected.
I’m not seeing anything in the docs that indicates this shouldn’t work, it looks like that method SHOULD be available on a GroupObject, but it doesn’t seem to be. Am I doing something stupid here? Or is this really not something I can do?
FYI, I just got the upgrade to Pro (thanks guys, going free is SWEEEEEEET!) so I don’t think this is a “not available at your tier level” thing either. I also DO NOT have compatibility turned on, so 2.0 for me.
Any ideas? Thanks!