Splash Screen Logo Issue

I have a splash screen or the very first screen that shows when my app launches. It was working fine until I started messing with some of my other lua files to get a backbutton issue to work. I’m not an expert but I don’t see how that impacted my Splashscreen. Anyway now when my splashscreen starts it still works but when it changes to the next screen the titlescreen page the logo from the splash screen shows up on my titlescreen page. How can I stop that? I loaded my splashscreen screen lua file below.

[lua]module(…, package.seeall)

– Main function - MUST return a display.newGroup()
function new()
print (“in load titlescreen file”)
local localGroup = display.newGroup()

local theTimer
local loadingImage

local showLoadingScreen = function()
loadingImage = display.newImageRect( “blackbackground.png”, 1600, 820)
localGroup:insert(loadingImage)

local goToLevel = function()
director:changeScene( “titlescreen” )
end

math.randomseed( os.time() )
theTimer = timer.performWithDelay( 1500, goToLevel, 1 )
end

local logo = display.newImage (“logo.png”)
logo.x = 240
logo.y = 150

showLoadingScreen()

unloadMe = function()
end

– MUST return a display.newGroup()
return localGroup
end[/lua] [import]uid: 72372 topic_id: 12558 reply_id: 312558[/import]

you missed out
localGroup:insert(logo)

when using director, you should insert all your objects to the group returned to unload it properly when you move to next screen…
let me know how it woks
:slight_smile: [import]uid: 71210 topic_id: 12558 reply_id: 45912[/import]

Technowand,

thank you again for replying. I had tried the insert logo but what happens is that the logo doesn’t even show up at all then. Only my background but it does transition like it is supposed to. The logo is just not there at all now. I entered the line you said under line 23 like so.

[lua]local logo = display.newImage (“logo.png”)
localGroup:insert(logo)
logo.x = 240
logo.y = 150[/lua] [import]uid: 72372 topic_id: 12558 reply_id: 45913[/import]

Hey I got it!! I moved the logo section right below the background section and that fixed it. I left the localgroup insert in like you suggested too.

thanks a million Technowand! [import]uid: 72372 topic_id: 12558 reply_id: 45914[/import]

hmmm now you are moving to the right track… :slight_smile:
happy development. looking forward to see your app soon…
[import]uid: 71210 topic_id: 12558 reply_id: 45915[/import]

When you load images in Corona the most current one loads “in front of” the last one loaded. If nothing overlaps you’ll never have a problem, but it’s always a good idea to load images from the back to the front. Load background images first, then whatever objects you’re using, then scores, text, etc., that should always be on top, last.

You happened upon the fix, but now you know *why* that worked! :slight_smile:

Jay
[import]uid: 9440 topic_id: 12558 reply_id: 45958[/import]

Since when were we allowed little avatar images?.. cool :slight_smile:

– Chris
[import]uid: 33866 topic_id: 12558 reply_id: 45965[/import]