Adding Permanent Background to Game

Hey folks,

First time posting here and i’ve been messing around with Corona (Including LUA) for the past few weeks so i’m not too familiar so please bare with me. I’m currently trying to add a permanent background that doesn’t move and only in portrait mode however i’m running into an issue when using the following extremely generic code:

local background = display.newImage("bg1.png");  

I noticed that on one of the starter courses supplied with Corona on the “Hello World” one it used that code to display a BG image and it worked.

Here is my code as of now without any background image

local \_H = display.contentHeight;  
local \_W = display.contentWidth;  
  
local btn = display.newImageRect("images/red\_ball.png",150, 150);  
btn:setReferencePoint(display.CenterReferencePoint);  
btn.x = \_W/2; btn.y = \_H/2;  
  
local txt = display.newText("Sample Text", 0, 0, native.systemFont, 16\*2);  
txt.xScale = 0.5; txt.yScale = 0.5;  
txt:setReferencePoint(display.CenterReferencePoint);  
txt.x = \_W/2; txt.y = \_H/2;  

Thanks in advanced. [import]uid: 19169 topic_id: 6269 reply_id: 306269[/import]

What is the issue you are running into? [import]uid: 20207 topic_id: 6269 reply_id: 21604[/import]

Ah sorry, I failed to mention that.

I’m not seeing any BG at all and it voids both my text and image, just shows a blank screen and when I clear that line all-together it shows everything fine, with a black background. [import]uid: 19169 topic_id: 6269 reply_id: 21605[/import]

Goes to show how much of an amateur I am, if anyone noticed and if anyone can take heed of my mistake here is what I did wrong:

I initially put:
[lua]local background = display.newImage(“bg1.png”);[/lua]

Where I should have done:
[lua]local background = display.newImage(“images/bg1.png”);[/lua]

Because I did not clarify the root directory of where my background image is stored, since it is local but not located in the same folder.
[import]uid: 36082 topic_id: 6269 reply_id: 21611[/import]