HELP PLEASE!!

im wondering how can i make the “blood.png” image appear UNDER the “woodholes.png”??? the bug is under it but for some reason, when i kill the bug, the blood appears OVER the woodholes.png image. please help! thanks in advance!

local bug = display.newImage( “goldbeetle.png” )
bug.x = 60
bug.y = 210
local function killbug (event)
local blood = display.newImage (“blood.png”)
blood.x = bug.x
blood.y = bug.y
score.setScore( score.getScore() + 10)
bug:removeSelf()
end

bug:addEventListener(“touch”, killbug)

local wood = display.newImage( “woodholes.png” )
wood.x = 240
wood.y = 160 [import]uid: 10827 topic_id: 4529 reply_id: 304529[/import]

The order images layer on top of each other defaults to the order you add them to the display. The tricky thing is that the killbug() function, and thus the newImage(“blood.png”) command in that function, isn’t run until after the display.newImage(“woodholes.png”) even though it is written before. Programs don’t flow straight from top to bottom, they jump around for stuff like for loops and function statements.

What you’ll need to do is bump up the wood to the top after adding the blood using this command:
http://developer.anscamobile.com/reference/index/objecttofront
(btw a more descriptive title would have been nice. just saying HELP doesn’t tell us anything about what’s in the thread. of course you need help, if you didn’t you wouldn’t be posting here) [import]uid: 12108 topic_id: 4529 reply_id: 14261[/import]