Here is an example of a way to handle this.
In the beginning load the images. Then cross fade them by fading one out and the other in. Finally dispose of the first screen. It in most cases is no longer needed (thats my guess). Do this by calling a cleanup function by adding “onComplete” to your final transition.
[code]
– Load images and hide welcome screen by setting alpha to 0.
local background=display.newImage(“image1.png”,true)
local welcome=display.newImage(“image2.png”,true)
welcome.alpha = 0
– Create function to remove startup image and clean up the memory used.
local function removeBackground()
background:removeSelf()
background = nil
collectgarbage(“collect”)
end
– Create function to cross fade images and finally
– call the function to start the fading.
local function fadeinfadeoutimage()
transition.to(background,{time=4500,alpha=0})
transition.to(welcome,{time=4500,alpha=1,onComplete=removeBackground})
end
fadeinfadeoutimage()
[/code] [import]uid: 56820 topic_id: 24472 reply_id: 99091[/import]