Object disappears after transition.dissolve()

I see an earlier post with similar title… but that indicates a prior bug that was fixed…

I created this simple test snippet to show what’s happening…
scenario like a concentration/match game, where a card face and back sit in the same space…using the two colored rects to illustrate here:

The first transition works (revealing the hidden-underneath rect), but the reverse transition (flipping back to the original view) shows the underlying rect briefly, then it disappears. No errors or warnings generated, just blank space.

I’ve tried a bunch of things to sort this out – should be easy, but I’m stuck --so thanks for any help.

display.setStatusBar(display.HiddenStatusBar)
function flip(event)
if “ended” == event.phase then
local grp = event.target
transition.dissolve(grp[2], grp[1], 5000) – show underlying
transition.dissolve(grp[1], grp[2], 5000) – re-show original
end
end

view = {}

view = display.newGroup()

local back = display.newRect(10,10,100,100)
back:setFillColor(0,100,0)
view:insert(back)

local front = display.newRect(10,10,100,100)
front:setFillColor(200,0,200)
view:insert(front)

view:addEventListener(“touch”, flip)
[import]uid: 34130 topic_id: 8329 reply_id: 308329[/import]

Try changing to the following line

transition.dissolve(grp[1], grp[2], 5000) -- re-show original  

To

transition.dissolve(grp[1], grp[2], 5000, 5000) -- re-show original  

So that the first transition completes before the second one begins

I don’t know if this is the effect you’re after [import]uid: 8366 topic_id: 8329 reply_id: 29728[/import]

That’s a big help. Works in the tiny example here…and I’m working the idea back into the real code.
I wasn’t paying enough attention to the time-based disruptions that can happen when too much transition stuff gets going at once.

Thanks again,
[import]uid: 34130 topic_id: 8329 reply_id: 29732[/import]