Thursday, 24 October 2013

Corona - Display Groups

local Group1 = display.newGroup()

This creates a new display group by the name of Group1. You can then add display objects to it.You should declare them near the top of your Lua document.You should create display groups in a specific order. The first declared group will actually reside behind the next group in visually layered order.
local farBackground = display.newGroup()  
local nearBackground = display.newGroup()  --this will overlay 'farBackground'  
local foreground = display.newGroup()  --and this will overlay 'nearBackground'

No comments:

Post a Comment