Spawn new images in for loop with delay

How do I make so that an image spawns inside a for loop with a delay
Got this code so far:

[code] local function spawnImage
if image=nil then
local image = display.newImage(“image.png”)
image.x = math.random(displayX/2 - 100, displayX/2 + 100)
physics.addBody(image)
soldier.myName = “image”
end
end

[/code] [import]uid: 24111 topic_id: 7793 reply_id: 307793[/import]

Never mind, fixed it :smiley:

[import]uid: 24111 topic_id: 7793 reply_id: 27628[/import]

How?

:smiley: [import]uid: 36639 topic_id: 7793 reply_id: 30294[/import]

same answer as here:
http://developer.anscamobile.com/forum/2010/10/04/how-delay-between-iterations-loop#comment-30301 [import]uid: 12108 topic_id: 7793 reply_id: 30302[/import]