[Resolved] Bring Object to Front Help

Hello. I have a background set up in front of everything that I placed on a lua file. What is a good solution to send it to the back?

[lua]module(…, package.seeall)

function new()

local section1Group = display.newGroup()

local background = display.newImage(“old_background_small.jpg”)

local scrollView = require(“scrollView”)
local util = require(“util”)
local topBoundary = display.screenOriginY
local bottomBoundary = display.screenOriginY
local scrollView = scrollView.new{top=topBoundary,bottom=bottomBoundary}

local back = display.newImage(“button_back_small.png”)
back.x = 40;
back.y = 23;
back.scene = “menu”

background:toBack()

section1Group:insert(scrollView)
section1Group:insert(back)
section1Group:insert(background, bringToBack)

scrollView:addScrollBar()

back:addEventListener(“touch”, changeScene)

return section1Group

end[/lua] [import]uid: 162639 topic_id: 33169 reply_id: 333169[/import]

Insert it first, then insert the other display objects on top of it. [import]uid: 36578 topic_id: 33169 reply_id: 131713[/import]

If you’re inserting it last, just insert into the first position in the display group: [lua]group:insert( 1, image )[/lua]

http://docs.coronalabs.com/api/type/GroupObject/insert.html [import]uid: 8271 topic_id: 33169 reply_id: 131718[/import]

or

obj:toBack()

http://docs.coronalabs.com/api/type/DisplayObject/toBack.html [import]uid: 19626 topic_id: 33169 reply_id: 131757[/import]

Insert it first, then insert the other display objects on top of it. [import]uid: 36578 topic_id: 33169 reply_id: 131713[/import]

If you’re inserting it last, just insert into the first position in the display group: [lua]group:insert( 1, image )[/lua]

http://docs.coronalabs.com/api/type/GroupObject/insert.html [import]uid: 8271 topic_id: 33169 reply_id: 131718[/import]

or

obj:toBack()

http://docs.coronalabs.com/api/type/DisplayObject/toBack.html [import]uid: 19626 topic_id: 33169 reply_id: 131757[/import]