Spawn more objects on Collision Detection?

Hi.
I’m trying to set a Collision Listener on a 6px tall object that is Static. There is one physical object currently, a falling square. What I want, is that when the Square hits the ground object, it spawns more squares.
I’m brand new to LUA, with a background in HTML. The code that I have currently for the event listener is:
[lua]Runtime:addEventListener( “touch”, startDrag )

local function onLocalCollision( event )
if ( event.phase == “began” ) then

elseif ( event.phase == “ended” ) then
end
end

Runtime:addEventListener( “collision”, onLocalCollision )[/lua]

*EDIT: I got the collision working, and I got it to print text in the Corona Terminal. But I’d like to stick with my goal of spawning more crates. Now I’d like to set the collision to work only with the ground. Is that possible?

*EDIT 2

AHA! I got it! MWuahahaha.

[lua]local function spawnCube()
local cube = display.newImage( “square.png” )
physics.addBody( cube, { density = 1.0, friction = 0.3, bounce = 0.2 } )
cube.x = math.random(250)
cube.y = math.random(-40)
end

local function onLocalCollision( event )
if ( event.phase == “began” ) then
timer.performWithDelay( 1000, spawnCube, 1 )

elseif ( event.phase == “ended” ) then
print(“Finish”)
end
end

Runtime:addEventListener( “collision”, onLocalCollision )

[import]uid: 25216 topic_id: 11693 reply_id: 311693[/import]