i cant open the screen1…Help me!!!
main.lua:
display.setStatusBar(display.HiddenStatusBar) local W = display.contentWidth / 2 local H = display.contentHeight / 2 local director = require("director") local mainGroup = display.newGroup() local function main() mainGroup:insert(director.directorView) director:changeScene("screen1") return true end main()
screen1.lua:
module(..., package.seeall) function new() local localGroup = display.newGroup() local play = display.newText("play", 0, 0, "Arial", 40) play.x = W play.y = H play.scene = "game" function changeScene(e) if(e.phase == "ended" then director:changeScene(e.target.scene) end end localGroup:insert(play) play:addEventListener("touch", changeScene) return localGroup end
screen1.lua:
module(..., package.seeall) function new() local localGroup = display.newGroup() local play = display.newText("play", 0, 0, "Arial", 40) play.x = W play.y = H play.scene = "game" function changeScene(e) if(e.phase == "ended" then director:changeScene(e.target.scene) end end localGroup:insert(play) play:addEventListener("touch", changeScene) return localGroup end
I would strongly discourage the use of ‘director class’. It’s way too bloated and it’s not good (and it is no class). Worst thing about it, it prevents your errors to be printed out correctly. There is a Corona builtin now that handles such things, or you could write the same functionality your own.
but your problem is probably the last lines of your main.lua after return true 
I would strongly discourage the use of ‘director class’. It’s way too bloated and it’s not good (and it is no class). Worst thing about it, it prevents your errors to be printed out correctly. There is a Corona builtin now that handles such things, or you could write the same functionality your own.
but your problem is probably the last lines of your main.lua after return true 