Scene hide transition?

Hi,
I am trying to create a transition where the next scene comes “fromTop” while at the same time I would like the current scene to go down at the same speed, creating an effect of an infinite canvas.
So I have something like this in my scene code when I want to trigger loading the next scene:

transition.moveBy(scene.view,{y = display.contentHeight,time=400})
composer.gotoScene("nextScene",{effect = "fromTop",time = 400})

But this doesn’t work. The current scene doesn’t seem to move and the next scene just comes from the top and covers it up.

Any suggestions or things I can try out to create this effect would be greatly helpful.

Thanks.

Hi!

From a quick test, I find that operations on Composer’s self.view stop once gotoScene is called.

A simple workaround to accomplish this would be to create your own display group to insert all of your scene objects, and insert said display group inside Composer’s self.view. Then perform your moveBy operation on said display group.

I mentioned that incase you would like to try out different things, because Composer has already that kind of effect, it’s called slideDown. :slightly_smiling_face:

--transition.moveBy(scene.view,{y = display.contentHeight,time=400})
composer.gotoScene("nextScene",{effect = "slideDown",time = 400})

You can see all current transition effects here.

Thank you very much! That works perfect. Meanwhile another way that seemed to work was to put the line

transition.moveBy(scene.view,{y = display.contentHeight,time=400})

In the nextScene Show function in the phase will section. The scene object I passed through the gotoScene parameters. But slide effect is much better and simpler.