Hey everyone,
I am having trouble with storyboard.gotoScene. When I click the button which is supposed to send the scene to “menu” nothing happens. Here is my code. Would appreciate if someone could find the bug. (By the way, If i change the storyboard.gotoScene(“menu”) part to something else it works, just not with the the gotoScene command)
[code]
function touched( event )
if(event.x < gameOver.x + 20 and event.x > gameOver.x - 100 and event.y < gameOver.y + 50 and event.y > gameOver.y - 50) then
storyboard.gotoScene( “menu” )
else
if(monster.isAlive == true) then
if(event.phase == “began”) then
if(event.x < 145) then
if(onGround) then
monster.accel = monster.accel + 29
audio.play(jump)
end
else
for a=1, blasts.numChildren, 1 do
if(blasts[a].isAlive == false) then
blasts[a].isAlive = true
blasts[a].x = monster.x + 10
blasts[a].y = monster.y
audio.play(shot)
break
else
if(event.x < play.x + 50 and event.x > play.x - 50 and event.y < play.y + 50 and event.y > play.y - 50) then
speed = 10
else
if(event.x < pause.x + 20 and event.x > pause.x - 20 and event.y < pause.y + 20 and event.y > pause.y - 20) then
speed = 0
monster.alive = false
monster:pause()
play.x = display.contentWidth*.7
play.y = display.contentHeight/10
end
end
end
end
end
end
end
end
end [import]uid: 175550 topic_id: 31246 reply_id: 331246[/import]