Title load screen fade-in

I would like to have my company’s logo fade in before the game starts, and I’d also like to have a chapter maker fade in and out before each level. What code would I use? [import]uid: 228129 topic_id: 35992 reply_id: 335992[/import]

How are you organizing your code? If you are using Storyboary API, you can pass “fade” parameter to it so it would do it. So you make a temporary scene and just call this line inside it to load your main.lua file (please note that your app should have implemented Storyboard API beforehand)

storyboard.gotoScene(“menu”, “fade”, 200)

There are other ways to achieve this such as transitions or manually fading a black image on your logo but from my current understanding of Corona, Stotyboard is the best approach. [import]uid: 206803 topic_id: 35992 reply_id: 143070[/import]

local splashScreen

local FadeIn = function()

splashScreen = display.newImageRect( “splash-screen.png”, 480, 320 )
splashScreen.x = 240; splashScreen.y = 160
transition.from( splashScreen, { time=4500, alpha=0.0, delay=0, transition=easing.inOutExpo } )
transition.to( splashScreen, { time=4500, alpha=1.0, delay=0, transition=easing.inOutExpo } )

end

timer.performWithDelay( 0, FadeIn, 1 )

local FadeOut = function()

transition.from( splashScreen, { time=4500, alpha=1.0, delay=0, transition=easing.inOutExpo } )
transition.to( splashScreen, { time=4500, alpha=0.0, delay=0, transition=easing.inOutExpo } )

end

timer.performWithDelay( 2700, FadeOut, 1) [import]uid: 176812 topic_id: 35992 reply_id: 143094[/import]

How are you organizing your code? If you are using Storyboary API, you can pass “fade” parameter to it so it would do it. So you make a temporary scene and just call this line inside it to load your main.lua file (please note that your app should have implemented Storyboard API beforehand)

storyboard.gotoScene(“menu”, “fade”, 200)

There are other ways to achieve this such as transitions or manually fading a black image on your logo but from my current understanding of Corona, Stotyboard is the best approach. [import]uid: 206803 topic_id: 35992 reply_id: 143070[/import]

local splashScreen

local FadeIn = function()

splashScreen = display.newImageRect( “splash-screen.png”, 480, 320 )
splashScreen.x = 240; splashScreen.y = 160
transition.from( splashScreen, { time=4500, alpha=0.0, delay=0, transition=easing.inOutExpo } )
transition.to( splashScreen, { time=4500, alpha=1.0, delay=0, transition=easing.inOutExpo } )

end

timer.performWithDelay( 0, FadeIn, 1 )

local FadeOut = function()

transition.from( splashScreen, { time=4500, alpha=1.0, delay=0, transition=easing.inOutExpo } )
transition.to( splashScreen, { time=4500, alpha=0.0, delay=0, transition=easing.inOutExpo } )

end

timer.performWithDelay( 2700, FadeOut, 1) [import]uid: 176812 topic_id: 35992 reply_id: 143094[/import]

How are you organizing your code? If you are using Storyboary API, you can pass “fade” parameter to it so it would do it. So you make a temporary scene and just call this line inside it to load your main.lua file (please note that your app should have implemented Storyboard API beforehand)

storyboard.gotoScene(“menu”, “fade”, 200)

There are other ways to achieve this such as transitions or manually fading a black image on your logo but from my current understanding of Corona, Stotyboard is the best approach. [import]uid: 206803 topic_id: 35992 reply_id: 143070[/import]

local splashScreen

local FadeIn = function()

splashScreen = display.newImageRect( “splash-screen.png”, 480, 320 )
splashScreen.x = 240; splashScreen.y = 160
transition.from( splashScreen, { time=4500, alpha=0.0, delay=0, transition=easing.inOutExpo } )
transition.to( splashScreen, { time=4500, alpha=1.0, delay=0, transition=easing.inOutExpo } )

end

timer.performWithDelay( 0, FadeIn, 1 )

local FadeOut = function()

transition.from( splashScreen, { time=4500, alpha=1.0, delay=0, transition=easing.inOutExpo } )
transition.to( splashScreen, { time=4500, alpha=0.0, delay=0, transition=easing.inOutExpo } )

end

timer.performWithDelay( 2700, FadeOut, 1) [import]uid: 176812 topic_id: 35992 reply_id: 143094[/import]

How are you organizing your code? If you are using Storyboary API, you can pass “fade” parameter to it so it would do it. So you make a temporary scene and just call this line inside it to load your main.lua file (please note that your app should have implemented Storyboard API beforehand)

storyboard.gotoScene(“menu”, “fade”, 200)

There are other ways to achieve this such as transitions or manually fading a black image on your logo but from my current understanding of Corona, Stotyboard is the best approach. [import]uid: 206803 topic_id: 35992 reply_id: 143070[/import]

local splashScreen

local FadeIn = function()

splashScreen = display.newImageRect( “splash-screen.png”, 480, 320 )
splashScreen.x = 240; splashScreen.y = 160
transition.from( splashScreen, { time=4500, alpha=0.0, delay=0, transition=easing.inOutExpo } )
transition.to( splashScreen, { time=4500, alpha=1.0, delay=0, transition=easing.inOutExpo } )

end

timer.performWithDelay( 0, FadeIn, 1 )

local FadeOut = function()

transition.from( splashScreen, { time=4500, alpha=1.0, delay=0, transition=easing.inOutExpo } )
transition.to( splashScreen, { time=4500, alpha=0.0, delay=0, transition=easing.inOutExpo } )

end

timer.performWithDelay( 2700, FadeOut, 1) [import]uid: 176812 topic_id: 35992 reply_id: 143094[/import]