Hi.
I conctact you cause i’ve a problem with my buttons.
When i touch the button with storyboard don’t run. instead if i tocuh the button with print it runs. Where is the problem? I post you the code.
local function handleButtonEvent( event )
local id = event.target.id
if id == “button1” then
storyboard.gotoScene( “player” )
elseif id == “button2” then
print (“go”)
elseif id == “button3” then
storyboard.gotoScene( “menu” )
elseif id == “button4” then
print (“save”)
end
end
–FIRST BUTTON
local button1 = widget.newButton
{
id = “button1”,
label = " 1",
onEvent = handleButtonEvent,
emboss = false,
--properties for a rounded rectangle button…
shape=“roundedRect”,
width = 120,
height = 32,
cornerRadius = 2,
fillColor = { default={ 1, 0, 0, 1 }, over={ 1, 0.1, 0.7, 0.4 } },
strokeColor = { default={ 1, 0.4, 0, 1 }, over={ 0.8, 0.8, 1, 1 } },
strokeWidth = 2
}
– Center the button
button1.x = 90
button1.y = 460
–SECOND BUTTON
local button2 = widget.newButton
{
label = “Scelta 2”,
id = “button2”,
onEvent = handleButtonEvent,
emboss = false,
--properties for a rounded rectangle button…
shape=“roundedRect”,
width = 120,
height = 32,
cornerRadius = 2,
fillColor = { default={ 1, 0, 0, 1 }, over={ 1, 0.1, 0.7, 0.4 } },
strokeColor = { default={ 1, 0.4, 0, 1 }, over={ 0.8, 0.8, 1, 1 } },
strokeWidth = 2
}
– Center the button
button2.x = 230
button2.y = 460