display.contentWidth is not working

hii

local nearback1=display.newImageRect("nearbk2.png",display.contentWidth,600) nearback1.x=0+display.screenOriginX nearback1.y=250+display.screenOriginY

my problem is . the image nearbk2 is not wide as my display.i had to add some numbers to my imagewdth to cover the entire screen

and someone suggested me to check out the config file but i dont understand what is wrong with it…here is my config file and image of simulator

application = { content = { width = 768, height = 1024, scale = "letterBox", fps = 30, --[[imageSuffix = { ["@2x"] = 2, ["@4x"] = 4, }, --]] }, }

Compare display.contentWidth with display.actualContent width. The difference is because of Dynamic Content Scaling. Search that on the blog and you’ll find some great posts about it, also some info in the Guides section of the documentation.

@horacebury

thanks  a lot…i think  your suggestion has solved my some other problems also…i searched  about my problem and topic  display.actualContentHeight  and i found an excellent  answer by rob miracle…here is the link

https://forums.coronalabs.com/topic/66600-anchor-point-y-axis/?hl=dispaly.actualcontentwidth#entry344569

Compare display.contentWidth with display.actualContent width. The difference is because of Dynamic Content Scaling. Search that on the blog and you’ll find some great posts about it, also some info in the Guides section of the documentation.

@horacebury

thanks  a lot…i think  your suggestion has solved my some other problems also…i searched  about my problem and topic  display.actualContentHeight  and i found an excellent  answer by rob miracle…here is the link

https://forums.coronalabs.com/topic/66600-anchor-point-y-axis/?hl=dispaly.actualcontentwidth#entry344569