Image Z order, Groups, and Director

Hello all, i have two questions regarding problems i ran into with Director class recently

1. is there anyway to make sure img2 is above img1?

1
2
3
4
5
6
7
8
9
10
11
localGroup = { display.newGroup(), display.newGroup() }
 
local img1 = display.newImage("one.png")
local img2 = display.newImage("two.png")
 
new = function()
    localGroup[1]:insert( img1 ) 
    localGroup[2]:insert( img2 ) -- img2 should be ontop of img1,  but this output display img2 below img1
 
    return localGroup[2]
end
views:1667 update:2011/10/12 18:33:00
corona forums © 2003-2011