There’s a new tutorial video (and sample code) on the MasteringCoronaSDK.com site. It’s free (although requires you register on the site) and talks about managing display objects that are “mass created” and don’t have variable names attached to them.
For example, in a loop like this:
for x = 1, 10 do
local foo = display.newImage("alien.png")
…you’ll end up with 10 alien objects on the screen, but no way to access them because the “foo” variable was reused each time.
Why doesn’t the next version of the loop overwrite the first display object?
And even if you DO end up with 10 aliens on the screen, how can you access them if they don’t have variable names?
That’s what the Corona SDK tutorial video and sample code cover.
Click that link, register (or sign in if you already have an account there) and check it out!