So, i’ve uploaded a file with two simplified examples of what I’m trying to explain here 
http://www.visual-music.org/evans/corona/TransitionsStoryboard.zip
In the zip files, there are two folders composed in the same way : a main.lua file (which calls the splash screen), 01_startscreen.lua, 02_menuscreen.lua.
First folder, “BUG” should show the starscreen. When you tap the start screen, a rectangle grows until it fills the screen, and then call “menuscreen”. As you can see, between the two scenes, you can see the splash screen behind and the blackscreen.
In the second folder, “WORKS”, once you tap the startscreen, it directly calls the “menuscreen”. And you can’t see the splashscreen / blackscreen.
I have absolutely no idea on how to deal with this…
And if you don’t wanna download the file, here is the code of the “buggy” version. (For the working fine version, simply call “moveToScene” in the touch event.
"BUGGY VERSION" :
- main.lua
-- Splash screen splashScreen = display.newImage("Default-568h@2x.png") splashScreen.anchorX = 0; splashScreen.anchorY = 0; -- Storyboard local storyboard = require "storyboard" storyboard.purgeOnSceneChange = true storyboard.gotoScene("01\_startscreen")
-
01_startscreen
local storyboard = require(“storyboard”) storyboard.purgeOnSceneChange = true local scene = storyboard.newScene() – Forward declaration local gameGroup local _W local _H local background local text local rectangleTransition local touchEvent local moveToScene function scene:createScene(event) gameGroup = self.view _W = display.contentWidth*0.5; _H = display.contentHeight*0.5; – Background used in this scene background = display.newRect(0,0, display.contentWidth, display.contentHeight) background.x = _W; background.y = _H; gameGroup:insert(background) – Text showing the name of the scene text = display.newText( “01 START SCREEN”, 100, 200, native.systemFont, 16 ) text.x = _W; text.y = _H; text:setFillColor(0,0,0) gameGroup:insert(text) – Creation of the rectangle that will be used as a transition – By defalut, it’s invisible and set at the center of the scene rectangleTransition = display.newRect(0,0,1,1) rectangleTransition:setFillColor(0,1,0) rectangleTransition.x = _W; rectangleTransition.y = _H; gameGroup:insert(rectangleTransition) end function scene:enterScene(event) gameGroup = self.view – Touch event when background is tapped – Triggers the transition and then calls “moveToScene()” function touchEvent(event) if event.phase == “began” then rectangleTransition.alpha = 1; transition.to(rectangleTransition, {time=200, xScale=display.contentWidth}) transition.to(rectangleTransition, {time=200, yScale=display.contentHeight, onComplete=moveToScene}) end end function moveToScene() storyboard.gotoScene(“02_menuscreen”) end background:addEventListener(“touch”, touchEvent) end function scene:exitScene(event) gameGroup = self.view local name = storyboard.getCurrentSceneName() local scene = storyboard.getScene(name) local group = scene.view – Purge for i=gameGroup.numChildren, 1, -1 do display.remove(gameGroup[i]) gameGroup[i] = nil end gameGroup = nil end scene:addEventListener(“createScene”, scene) scene:addEventListener(“enterScene”, scene) scene:addEventListener(“exitScene”, scene) return scene
-
02_menuscreen.lua
local storyboard = require(“storyboard”) storyboard.purgeOnSceneChange = true local scene = storyboard.newScene() – Forward declaration local gameGroup local _W local _H local background local text function scene:createScene(event) gameGroup = self.view _W = display.contentWidth*0.5; _H = display.contentHeight*0.5; background = display.newRect(0,0, display.contentWidth, display.contentHeight) background:setFillColor(0,1,0) background.x = _W; background.y = _H; gameGroup:insert(background) text = display.newText( “02 MENU SCREEN”, 100, 200, native.systemFont, 16 ) text.x = _W; text.y = _H; text:setFillColor(0,0,0) gameGroup:insert(text) end function scene:enterScene(event) gameGroup = self.view end function scene:exitScene(event) gameGroup = self.view local name = storyboard.getCurrentSceneName() local scene = storyboard.getScene(name) local group = scene.view – Purge for i=gameGroup.numChildren, 1, -1 do display.remove(gameGroup[i]) gameGroup[i] = nil end gameGroup = nil end scene:addEventListener(“createScene”, scene) scene:addEventListener(“enterScene”, scene) scene:addEventListener(“exitScene”, scene) return scene