setFillColor method not working on object inserted into scrollView

I have an object which I am trying to change the color of on every frame update. This object is inside a widget.newScrollView group.

When I comment the line that inserts the object into the scrollview then the color updating works fine.

[lua]

– Objects I am trying to modify

local helpScrollView = widget.newScrollView{

    top = 0, left = 0,

    width = containerWidth, height = containerHeight,

    scrollWidth = containerWidth, scrollHeight = containerHeight,

    hideScrollBar = true,

    horizontalScrollDisabled = true,

    maskFile = graphicsPath…“mask_640_squared.png”,

    backgroundColor = { 0,0,0,0 }

}

local crucible = display.newImageRect( graphicsPath…“crucible_inner.png”, halfScreenWidth, halfScreenWidth)

crucible.xScale = 0.5

crucible.yScale = 0.5

crucible.y = screenHeight*0.15

crucible.x = screenWidth*0.5

helpScrollView:insert( crucible )

   

local crucibleInside = display.newImageRect( graphicsPath…“circle_inside.png”, screenWidth*0.4, screenWidth*0.4)

crucibleInside.xScale = 0.5

crucibleInside.yScale = 0.5

crucibleInside.x = crucible.x

crucibleInside.y = crucible.y

helpScrollView:insert( crucibleInside )

–enterFrame listener

local function updateOverlay()

   local r,g,b =  colorShifter.getShiftState( shiftIndex )

   crucibleInside:setFillColor( r,g,b )

end

[/lua]

Any ideas what’s going on?

Thanks in advance!

You can’t use setFillColor on objects which have been masked, OR if they are in a scroll/table view which has a mask (which yours does).

I’m not aware of any workaround for this, but maybe someone can correct me on that.

If that’s the case then that sucks! I’ll have to rework my screen to have that object outside of the scroll container I guess :frowning:

Thanks for the info!

You can’t use setFillColor on objects which have been masked, OR if they are in a scroll/table view which has a mask (which yours does).

I’m not aware of any workaround for this, but maybe someone can correct me on that.

If that’s the case then that sucks! I’ll have to rework my screen to have that object outside of the scroll container I guess :frowning:

Thanks for the info!