Hi,
I have this portion of code into a scene:enterScene storyboard :
local myFichier = tostring(params.nomVille..myId..".jpg")
local myStaticImage
local function chargeImageListener( event )
if (event.isError ) then
--print ("erreur de chargement")
else
myStaticImage = display.newImageRect( myFichier, system.TemporaryDirectory, 316, 136)
myStaticImage:setReferencePoint(TopLeftReferencePoint)
myStaticImage.x = display.contentWidth/2
myStaticImage.y = (myStaticImage.height/2)+40
myStaticImage:setReferencePoint(TopLeftReferencePoint)
myStaticImage.alpha = 0
transition.to( myStaticImage, { alpha = 1.0 } )
end
end
network.download( maCarte, "GET", chargeImageListener, myFichier, system.TemporaryDirectory )
maCarte is a url to a image on a server.
It works well but when i go out the scene, the display object do not remove itself.
I have written in exitScene :
display.remove(myStaticImage)
bit it is still here.
I have try display.removeSelf but it crashes.
What do I miss ?
Regards
Frédéric
[import]uid: 5578 topic_id: 27693 reply_id: 327693[/import]