Thanks for trying to help Steve Ancell. I tried it but it didn't solve the problem. Now, i know this will sound totally weird, but i actually did solve the problem...but i have no clue why it now works. Here is what i did...you will not believe it. I simply added a variable that count between my menu choices and the end of the loop! Look for the line WAITING=WAITING+1 i didn't even check for a result, it just work perfect now!
it seems to give the time to the program to actually delete the sprite and image before returning or i don't know why, but it now works perfectly. I can't imagine how many people run into this and never figure out why their program didn't work when the logic is good.
...from main loop...
if GetPointerPressed()=1
if choix=1 then gosub Tutorial
if choix=2 then gosub NewGame
if choix=3 then gosub LoadGame
if choix=4 then gosub SeeCompletedEnding
if choix=5 then gosub ChangeSettings
endif
Print( mx )
print( my )
print( choix )
print( flicker )
waiting=waiting+1
Print( ScreenFPS() )
Sync()
loop
TUTORIAL:
loadimage( 8,"MapTutorial.png")
createSprite(8,8)
SetSpriteScale(8,2,2)
SetSpriteDepth(8,8)
do
`setSpriteVisible(8,1)
if GetPointerReleased()=1 then waiting=1
if waiting=1
if GetPointerPressed()=1
exit
endif
endif
sync()
loop
DeleteSprite(8)
DeleteImage(8)
sync()
RETURN