Hey Everybody,
I am a newby working on my first game. I am using the director file to transition to other screens. I have the screen where it will transition when I click on a button but when it goes to the screen my other images on that screen will not show up. The only thing that shows up is my background. Please see my code for my second screen below.
module(…, package.seeall)
function new()
local localGroup = display.newGroup()
–> This is how we start every single file or “screen” in our folder, except for main.lua
– and director.lua
–> director.lua is NEVER modified, while only one line in main.lua changes, described in that file
local background = display.newImage (“blackbackground.png”)
localGroup:insert(background)
–> This sets the background
local gameboard = display.newimage (“gameboard.png”)
gameboard.x = 100
gameboard.y = 240
localGroup:insert(gameboard)
–> This places our gameboard
local backbutton = display.newImage (“backbutton.png”)
backbutton.x = 100
backbutton.y = 240
localGroup:insert(backbutton)
–> This places our “back” button
local function pressBack (event)
if event.phase == “ended” then
director:changeScene (“titlescreen”)
end
end
backbutton:addEventListener (“touch”, pressBack)
–> This adds the function and listener to the “back” button
return localGroup
end
–> This is how we end every file except for director and main, as mentioned in my first comment [import]uid: 72372 topic_id: 12141 reply_id: 312141[/import]

