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!
