Spawn into displayGroup?

Hi there,

I have a problem concerning globals, I think:

I define 3 displayGroups in main.lua: backGroup, heroGroup and frontGroup. What I want is to spawn graphics from a separate modules, with part of the spawned sprites appear in backGroup, and part of 'em appearing in frontGroup (so the heroGroup rests inbetween the two groups). Unfortunately I can’t seem to call backGroup and frontGroup from my module that spawns the new sprites.

Any ideas?

Thanks!
Thomas [import]uid: 70134 topic_id: 24979 reply_id: 324979[/import]

send the group name to the function

in main when u call function

functionName( groupName )

in module

functionName( arg )
object = display.newImage…
arg:insert( object )
end [import]uid: 7911 topic_id: 24979 reply_id: 101389[/import]