Hello !!
I’m using the new director 1.4 … and whenever i run it, it gives me this error:
“Director ERROR: The scene name must be a string.scene = nil”
can someone help me with this??
_______________________________
MAIN.LUA
________________________________
function changeScene(e)
if (e.phase == “ended”) then
director:changeScene(e.target.scene)
end
end
local director = require(“director”)
local mainGroup = display.newGroup()
local function main()
mainGroup:insert(director.directorView)
director:changeScene(“startpage”)
return true;
end
main();
MENU
…
module (…, package.seeall)
function new()
local startGroup = display.newGroup()
local background = display.newImage(“background.png”)
local textObject = display.newText( “Play”, 50, 50, nil, 24 )
textObject:setTextColor( 255,255,255 )
textObject.x = 160
textObject.y = 160
textObject.Scene = “game”
startGroup:insert(background)
startGroup:insert(textObject)
textObject:addEventListener(“touch”, changeScene)
return startGroup
end
please help? [import]uid: 202019 topic_id: 36451 reply_id: 336451[/import]