Looking for advice on transition/cut scene using composer

Bare with me, long time developer but completely new to Lua/Corona

So I have a composer scene called “visual” and this scene plays a sprite animation, a short audio clip, and displays an image.  When a user clicks the next button i want it to slide transition to the same scene “visual” with a new animation, audio, and image. 
 

I’m currently trying to do it by bouncing back and forth between visual.lua and transition.lua and removing the scene in between. It works roughly but not perfectly.  Is this the best way to do it?  If so is there a good template somewhere that outlines this toggle? 

Really could use a little help…  The desired action im describing is basically interactive flash cards that slideLeft when the next button is clicked. 

The way I have it setup now the transistion just do not work as I hoped.  I think im just going about it the wrong way.

I have not used composer much, but you could get this functionality just staying in the one scene. It seems to me from what you describe the only thing composer is really handling for you in that functionality is ‘transitioning’ the flash card onto screen.  

Create a table in this scene to hold the ‘flash cards’. 

Store them all off the right side of screen, as you create them  (  x = display.contentWidth + 200 )

When button is pressed by user, use ‘transition.to’ to slide the ‘flash card’ to the position on screen where you want it.  Either fade out the previous flash card image or ‘transition.to’ off the the screen.

I can try and type up some example for you, if you really need it. 

Since you’re using composer, I’d simply address each “flash card” as a new scene…visual1.lua, visual2.lua, etc. Then set up a touch function for your “next” button like this: 

local function onSceneTouch( self, event )

         if event.phase == “began” then

                composer.gotoScene( “visual2”, “slideLeft”, 800  )

                return true

         end

end

Check out the Composer example in the Sample Code that comes with Corona. There is an example of this. 

Really could use a little help…  The desired action im describing is basically interactive flash cards that slideLeft when the next button is clicked. 

The way I have it setup now the transistion just do not work as I hoped.  I think im just going about it the wrong way.

I have not used composer much, but you could get this functionality just staying in the one scene. It seems to me from what you describe the only thing composer is really handling for you in that functionality is ‘transitioning’ the flash card onto screen.  

Create a table in this scene to hold the ‘flash cards’. 

Store them all off the right side of screen, as you create them  (  x = display.contentWidth + 200 )

When button is pressed by user, use ‘transition.to’ to slide the ‘flash card’ to the position on screen where you want it.  Either fade out the previous flash card image or ‘transition.to’ off the the screen.

I can try and type up some example for you, if you really need it. 

Since you’re using composer, I’d simply address each “flash card” as a new scene…visual1.lua, visual2.lua, etc. Then set up a touch function for your “next” button like this: 

local function onSceneTouch( self, event )

         if event.phase == “began” then

                composer.gotoScene( “visual2”, “slideLeft”, 800  )

                return true

         end

end

Check out the Composer example in the Sample Code that comes with Corona. There is an example of this.