Problem with two tap to go to scenes

level8.name = “level8”

Or whatever you need to identify the level

Rob

local composer = require("composer") local scene = composer.newScene() function scene:create(e) local brownGradientFill = { type = "gradient", color1 = { 150/255, 150/255, 150/255, 1 }, color2 = { 1, 1, 1, 1 }, direction = "down" } bg = display.newRect(0,0,\_SCREEN.WIDTH, \_SCREEN.HEIGHT) bg.x = \_SCREEN.CENTER.x bg.y = \_SCREEN.CENTER.y bg.fill = brownGradientFill local font = "Consolas" or system.nativeFont or "AmericanTypewriter" level1 = display.newImageRect("playrect.png",110,110) level1.x = \_SCREEN.CENTER.x - 185 level1.y = \_SCREEN.CENTER.y - 105 level1text = display.newText ("1",0,0, font, 80) level1text.x = \_SCREEN.CENTER.x - 185 level1text.y = \_SCREEN.CENTER.y - 115 level1text.fill = { 1, 1, 1 } level2 = display.newImageRect("playrect.png",110,110) level2.x = \_SCREEN.CENTER.x - 62 level2.y = \_SCREEN.CENTER.y - 105 level2text = display.newText ("2",0,0, font, 80) level2text.x = \_SCREEN.CENTER.x - 62 level2text.y = \_SCREEN.CENTER.y - 115 level2text.fill = { 1, 1, 1 } level3 = display.newImageRect("playrect.png",110,110) level3.x = \_SCREEN.CENTER.x + 62 level3.y = \_SCREEN.CENTER.y - 105 level3text = display.newText ("3",0,0, font, 80) level3text.x = \_SCREEN.CENTER.x + 62 level3text.y = \_SCREEN.CENTER.y - 115 level3text.fill = { 1, 1, 1 } level4 = display.newImageRect("playrect.png",110,110) level4.x = \_SCREEN.CENTER.x + 187 level4.y = \_SCREEN.CENTER.y - 105 level4text = display.newText ("4",0,0, font, 80) level4text.x = \_SCREEN.CENTER.x + 187 level4text.y = \_SCREEN.CENTER.y - 115 level4text.fill = { 1, 1, 1 } level5 = display.newImageRect("playrect.png",110,110) level5.x = \_SCREEN.CENTER.x - 185 level5.y = \_SCREEN.CENTER.y + 10 level5text = display.newText ("5",0,0, font, 80) level5text.x = \_SCREEN.CENTER.x - 185 level5text.y = \_SCREEN.CENTER.y + 10 level5text.fill = { 1, 1, 1 } level6 = display.newImageRect("playrect.png",110,110) level6.x = \_SCREEN.CENTER.x - 62 level6.y = \_SCREEN.CENTER.y + 10 level6text = display.newText ("6",0,0, font, 80) level6text.x = \_SCREEN.CENTER.x - 62 level6text.y = \_SCREEN.CENTER.y +10 level6text.fill = { 1, 1, 1 } level7 = display.newImageRect("playrect.png",110,110) level7.x = \_SCREEN.CENTER.x + 62 level7.y = \_SCREEN.CENTER.y + 10 level7text = display.newText ("7",0,0, font, 80) level7text.x = \_SCREEN.CENTER.x + 62 level7text.y = \_SCREEN.CENTER.y + 10 level7text.fill = { 1, 1, 1 } level8 = display.newImageRect("playrect.png",110,110) level8.x = \_SCREEN.CENTER.x + 187 level8.y = \_SCREEN.CENTER.y + 10 level8text = display.newText ("8",0,0, font, 80) level8text.x = \_SCREEN.CENTER.x + 187 level8text.y = \_SCREEN.CENTER.y + 10 level8text.fill = { 1, 1, 1 } rightarrow = display.newImageRect("rightarrow.png",200,110) rightarrow.x = \_SCREEN.CENTER.x + 130 rightarrow.y = \_SCREEN.CENTER.y + 110 hblevelselect = display.newImageRect("playrect.png",75,75) hblevelselect.x = \_SCREEN.CENTER.x - 175 hblevelselect.y = \_SCREEN.CENTER.y + 110 hblevelselecttext = display.newText ("Home",0,0, font, 25) hblevelselecttext.x = \_SCREEN.CENTER.x - 175 hblevelselecttext.y = \_SCREEN.CENTER.y + 110 hblevelselecttext.fill = { 1, 1, 1 } end function scene:show(e) if(e.phase == "will") then function rightarrow:tap(e) composer.gotoScene("levelselect2") end function hblevelselect:tap(e) composer.gotoScene("mainscreen") end rightarrow:addEventListener("tap", rightarrow) hblevelselect:addEventListener("tap", hblevelselect) end end function scene:hide(e) if(e.phase == "will") then composer.removeScene("levelselect") end end scene:addEventListener("create", scene) scene:addEventListener("show", scene) scene:addEventListener("hide", scene) return scene

Hey thank you for keeping with me and sorry for asking all of the questions I know it is probably annoying you but for some reason I am super stumped I tried those things you suggested and still can’t figure it out I add the hblevelselect to the scene.show and it still does the same thing. What should I do to make this work. (Again very sorry, i’m just super confused)

Hi.  Late to the party, but we did a whole series (with lots of code) on Composer here.

roaminggamer, the link has a 404 error. could you try it again please?

Updated above.

Note: Links often get corrupted when posted to forums, but you can always grab the part after http(s):// and re-paste it.

Meanwhile, I’ll try to remember to test my links.  I seem to do that a lot.

:frowning: