Problem with Display Groups

I'm having a bit of a mare here trying to use display groups.
Near the top of my code I'm creating various display groups like thus:

1
2
3
4
5
arena_base = display.newGroup           -- base of arena (floor, wall etc.)
entities = display.newGroup             -- food, critter, bombs, enemies etc.
flashystuff = display.newGroup  -- Particles, explosions etc.
gametext = display.newGroup             -- Any text to be displayed
arena_top = display.newGroup            -- Anything that needs to be on top.

when you create new groups, you have to invoke the function to get an object, what you have/are doing is assigning it a function.

in simpler language,

1
2
3
4
arena_base = display.newGroup 
arena_base_object = arena_base()
background = display.newImage("gfx/arena1.png")
arena_base_object:insert(background)

Right, yeah, that makes sense. I just can't believe it took me so long to spot the mistake. Cheers :)

views:1447 update:2011/10/11 8:57:46
corona forums © 2003-2011