How to delete an image from the scene (delay time)

Hi guys!!!, this code is trying to delete an image with delay. The code works, but I don’t know how to delete an image from the scene. There are some images that are supported over the image that I want to delete, so, I want to delete the support image, doing fall all the other images that are above. Isn’t alfa=0, or dissolve, because the image is still ther invisible, I want to erase the image.

Well, if somebody knows something about delete images, thanks in advance.

the code:

–*****GROUND ********************
local ground = display.newRect( 0, baseline, 480, 5 )
ground.x = _W / 2
ground.y = baseline
ground:setFillColor(0, 255, 0)
physics.addBody(ground, “kinematic”, {density = 1.0, friction = 1, bounce = 0.2})
ground.myName = “ground”
–***********************************

local numSeconds = 5
local counterSize = 0
local counter = display.newText( tostring( numSeconds ), 0, 0, system.systemFontBold, counterSize )
counter.x = 100
counter.y = 100 + counterSize
local baseline = 290
_H = display.contentHeight
_W = display.contentWidth

function counter:timer( event )
numSeconds = numSeconds - 1
counter.text = tostring( numSeconds )

if 0 == numSeconds then
– This is the problem!!!transition.dissolve( ground, 500 )
native.setActivityIndicator( false );
end
end

timer.performWithDelay( 1000, counter, numSeconds ) [import]uid: 54055 topic_id: 14103 reply_id: 314103[/import]

Hey there,

See this; http://developer.anscamobile.com/content/transitiondissolve

It’s looking for two images to get referenced there but was instead getting a number value. (500).

I had a quick play and this seems to work without errors;
[lua]transition.dissolve( ground, nil, 500 )[/lua]

Let me know how it goes for you :slight_smile:

Peach [import]uid: 52491 topic_id: 14103 reply_id: 51979[/import]

Very good!!, it works.

Thanks!!! [import]uid: 54055 topic_id: 14103 reply_id: 52716[/import]

No worries :slight_smile: [import]uid: 52491 topic_id: 14103 reply_id: 52847[/import]