Basic help with positioning text

I have two text displays. they look like this http://prntscr.com/bjlqv6
The code I used to put them there looks like this

ScoreDisplay = display.newText( "Distance 0", 5, 15, native.systemFontBold, 20 ) ScoreDisplay:setFillColor(0) ScoreDisplay.align = "left" ScoreDisplay.anchorX = 0   tempload = loadsave.loadTable("SaveFile.json") table.sort(tempload,function(a,b) return a\>b end) BestDisplay = display.newText( "Best " .. tempload[1], display.actualContentWidth-100, 15, native.systemFontBold, 20 ) BestDisplay:setFillColor(0) BestDisplay.align = "left"

How would I properly attach them to the top left and right corners? 

Use anchorX, not align

local left = display.contentCenterX - display.actualContentWidth/2 local right = display.contentCenterX + display.actualContentWidth/2 local top = display.contentCenterY - display.actualContentHeight/2 local ScoreDisplay = display.newText( "Distance 0", left + 5, top + 15, native.systemFontBold, 20 ) ScoreDisplay:setFillColor(0) ScoreDisplay.anchorX = 0 ScoreDisplay.anchorY = 0 tempload = loadsave.loadTable("SaveFile.json") table.sort(tempload,function(a,b) return a\>b end) local BestDisplay = display.newText( "Best " .. tempload[1], right - 5, top + 15, native.systemFontBold, 20 ) BestDisplay:setFillColor(0) BestDisplay.anchorX = 1 BestDisplay.anchorY = 0

Thank you roaminggamer

Also just to not create a new thread. Why doesn’t widget.newImage() load images on my computer?

http://prntscr.com/bjnaxb

I created the default template for a physics game demo and it can’t load the image in the file but using display.newimage works

 widget.newImage()?  There is no such animal.

https://docs.coronalabs.com/daily/api/

Whoops I meant widget.newButton() does not display the image but the clicking of where the button is works. I have not edited the code. I may have to resort to having a fake image to try and make it look like a button

Use anchorX, not align

local left = display.contentCenterX - display.actualContentWidth/2 local right = display.contentCenterX + display.actualContentWidth/2 local top = display.contentCenterY - display.actualContentHeight/2 local ScoreDisplay = display.newText( "Distance 0", left + 5, top + 15, native.systemFontBold, 20 ) ScoreDisplay:setFillColor(0) ScoreDisplay.anchorX = 0 ScoreDisplay.anchorY = 0 tempload = loadsave.loadTable("SaveFile.json") table.sort(tempload,function(a,b) return a\>b end) local BestDisplay = display.newText( "Best " .. tempload[1], right - 5, top + 15, native.systemFontBold, 20 ) BestDisplay:setFillColor(0) BestDisplay.anchorX = 1 BestDisplay.anchorY = 0

Thank you roaminggamer

Also just to not create a new thread. Why doesn’t widget.newImage() load images on my computer?

http://prntscr.com/bjnaxb

I created the default template for a physics game demo and it can’t load the image in the file but using display.newimage works

 widget.newImage()?  There is no such animal.

https://docs.coronalabs.com/daily/api/

Whoops I meant widget.newButton() does not display the image but the clicking of where the button is works. I have not edited the code. I may have to resort to having a fake image to try and make it look like a button