“storyboard.gotoScene” not Work
but button it work can print text
how i can fix it ?
thanks
[lua]local storyboard = require “storyboard”
local resetReference = function( index )
end
local checkLocation = function( index )
end
end
end
else
return false
end
end
local createPuzzle = function()
end
local startDrag = function( event )
end
local scatterPuzzle = function()
end
– activate buttons
newPuzzleBtn.isActive = true
backBtn.isActive = true
isReady = true
Runtime:addEventListener( “touch”, startDrag )
end
end
end
local drawBackground = function()
end
function backMainMenu( event )
storyboard.gotoScene( “menu”, “fade”, 500 )
print(“it can Print”)
return true
end
local backButton = function()
backBtn = ui.newButton{
defaultSrc = “picMain/btn_menu.png”,
defaultX = 275,
defaultY = 100,
overSrc = “picMain/btn_menu.png”,
overX = 280,
overY = 100,
onEvent =backMainMenu,
id = “backBtn”,
text = “”,
font = “Helvetica”,
textColor = { 255, 255, 255, 255 },
size = 16,
emboss = false
}
backBtn.x = display.contentWidth*0.5 - 130 ; backBtn.y = display.contentHeight / 2 +465
screenGroup:insert( backBtn )
end
local createGlow = function()
end
local touchNewPuzzleBtn = function( event )
if event.phase == “release” and newPuzzleBtn.isActive then
newPuzzleBtn.isActive = false
number = nil
–showImageFinish.removeSelf()
nextPuzzle()
end
end
local appInit = function()
end
appInit()
end
loadNewPuzzle()
nextPuzzle = function()
---- Code
end
end[/lua] [import]uid: 169163 topic_id: 29817 reply_id: 329817[/import]