HI,
could some kind soul please show me how to use the newSwitch with a 2 frame spritesheet please?
I can get the button working fine with checkbox etc but just dont seem to able to load in an imagesheet?
Below is the code I am using. thank you
[lua]
local soundCheckBox = widget.newSwitch
{
left = display.contentWidth /2 +60,
top = 335,
width = 80,
height = 80,
style = “checkbox”,
sheet = …what goes here ???
frameOn = 1,
frameOff =2,
initialSwitchState = true,
onPress = function(e)
local check = e.target
if(check.isOn) then
audio.play(bgm,{channel=1, loops = -1})
else
audio.stop(1)
end
end
[/lua]