simple problem with png

I have what I thought was going to be a simple problem to troubleshoot, but everything I have tried has
failed. I am using corona with the simulator and terminal.

My problem is I have 10 balls on the screen and when those balls are placed in the correct spots then a png file should show its self. The png file is just a “Game Over” sign. The png file will only show its self
the first time but after the player presses the game’s reset button to replay the game. The “Game Over” sign will not show. The only way I can make it show at the end of a game is to press the command R buttons on the key broad.
I need the “Game Over” sign to show it’s self after each game with just a tap on the reset button which seems to work for everything else.
I am using the print(" game over ") code to test my code and the print code works but the png file
Is this a problem with the or what?

My code is below

if ( tonumber(count_txt.text) == total_sphere) then

gameoverpng = display.newImage(“gameover.png”);
gameoverpng.x = _W*.5; gameoverpng.y = _H*.5;
gameoverpng.alpha = 1
bkgd2:insert(gameoverpng)
print(“game over”) --this line prints in the terminal but the png file above doesn’t show.

end
end

thanks for any help [import]uid: 17539 topic_id: 13416 reply_id: 313416[/import]

my initial thought is that there is some other group or image over bkgd2. is there any group created after bkgd2 ?
[import]uid: 71210 topic_id: 13416 reply_id: 49275[/import]

Thanks for the help.

I got it working. I took the display.newImage method out of the function and put it as close to the top of the program as possible and then set the alpha of the png file to 0. Then I set the alpha in the function to 1 and the alpha in the reset button to 0.

I did move the groups around but that didn’t seem to make any difference. [import]uid: 17539 topic_id: 13416 reply_id: 49284[/import]