I have now changed my main.lua to look like this
[code]local director = require(“director”)
local mainGroup =display.newGroup ( )
local function main ()
mainGroup:insert(director.directorView)
director:changeScene(“intro”)
return true
end
main( )
[/code]and put my game in game.lua thought it would be better to handle it that way and my intro.lua looks like this :
[code]module ( … , package.seeall )
function new ( )
local introGroup = display.newGroup ( )
local background = display.newImage(“Basket-ball.jpg”)
local begin = display.newImage(“start_button.png”)
begin.x = 160
begin.y = 400
begin.scene = “game”
function changeScene(e)
if ( e.phase == “ended”) then
director:changeScene(e.target.scene)
end
end
introGroup:insert (background)
introGroup:insert (begin)
begin:addEventListener ( “touch” , changeScene )
return introGroup
end
[/code]and it seems it worked thanks for help [import]uid: 189039 topic_id: 32328 reply_id: 129060[/import]