Small splashscreen/menu overlapping error

Hi

I am a beginner at Corona SDK and have encountered a problem recently when working on a game I’m creating.

The code is used to display a picture of a company logo first, like how every game does, then display the backdrop of the menu, followed by the play/options/exit buttons (similar to how the PC game Skyrim does)

I am stuck, however, at the first two parts.

Here is the line of code:

splashscreen = display.newImage( “LoadScreen.png”,480,320 );

splashscreen.x, splashscreen.y = display.contentWidth / 2, display.contentHeight / 2

local function removeSplash(event)

splashscreen:removeSelf()

splashscreen = nil

end

timer.performWithDelay(4000,removeSplash)

local menuBack = display.newImage(“MenuBackground.png”, 160, 240)

menuBack.x, menuBack.y = display.contentWidth / 2, display.contentHeight / 2

local menutitle = display.newImage(“MenuTitle.png”, 240, 70)

I have changed the menuBack image’s position on the screen so it can expose part of what is behind it, and, surprise, I found the company logo hiding right behind it. So there’s an overlapping problem.

Can anyone please try and find the error within my code that is causing it to do this? 

Thanks in advance.

I guess this is the problem: “The code is used to display a picture of a company logo first,”

Create the logo last. A newly created display object, such as an image, will be on top of an earlier created display object.

You can also add the images into a displayGroup: https://docs.coronalabs.com/api/library/display/newGroup.html

Add the logo to the displayGroup last as well.

You can also use the “Lazy man’s” version: https://docs.coronalabs.com/api/type/DisplayObject/toFront.html

Best regards,

Tomas

You can also use the default launch images, unless you are displaying something else as the default launch image, or feel it doesn’t stay there long enough.

Cheers,

Simon

Dixon Court Entertainment

I guess this is the problem: “The code is used to display a picture of a company logo first,”

Create the logo last. A newly created display object, such as an image, will be on top of an earlier created display object.

You can also add the images into a displayGroup: https://docs.coronalabs.com/api/library/display/newGroup.html

Add the logo to the displayGroup last as well.

You can also use the “Lazy man’s” version: https://docs.coronalabs.com/api/type/DisplayObject/toFront.html

Best regards,

Tomas

You can also use the default launch images, unless you are displaying something else as the default launch image, or feel it doesn’t stay there long enough.

Cheers,

Simon

Dixon Court Entertainment