I am trying to fill a rounded rectangle with a particular frame of an image sheet, but when I run this code, the entire image sheet is used as fill.
[lua]
local mySheet = graphics.newImageSheet(“starburst.png”, {
width = 100,
height = 100,
numFrames = 48,
})
local imgRect = display.newRoundedRect(100, 100, 100, 100, 30)
imgRect.fill = {type = “image”, sheet = mySheet, frame = 1}
[/lua]
Is this the correct way to do this, or am I missing something?
thanks,
–John