Transition scene is not working?

My menu.lua -> nextScene. The situation here is " composer.gotoScene( “operations”, { effect = “fade”, time = 300 } )" effect and time doesn’t apply going to nextScene. here’s the code. My button is usually an image that is assign to other lua file its supposed to be a directory but i assigned it to a variable.

local function onplayBtnRelease() composer.gotoScene( "operations", { effect = "fade", time = 300 } ) composer.removeScene( "menu") local btnClick = audio.loadStream("sound/gameClick.wav", {channel = soundAudioChannel}) audio.play(btnClick) return true end function scene:create( event ) local sceneGroup = self.view local background = display.newImage("images/background2.jpeg", display.contentHeight, display.contentWidth) background:addEventListener( "touch", stopTouches ) background:addEventListener( "tap", stopTouches ) background.anchorX = 0 background.anchorY = 0 background.x, background.y = 0, 0 mainMenu = display.newGroup() local playBtn = widget.newButton{ defaultFile= btnDefaultPlay, overFile= btnOverPlay, width=350, height=250, onRelease = onplayBtnRelease -- event listener function } playBtn.x = 500 playBtn.y = 875 mainMenu.playBtn = playBtn end function scene:show( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then -- Called when the scene is still off screen (but is about to come on screen). elseif ( phase == "did" ) then -- Called when the scene is now on screen. -- Insert code here to make the scene come alive. -- Example: start timers, begin animation, play audio, etc. composer.removeHidden() -- Now that the scene has appeared, allow dragging etc touchEnabled = true end end function scene:hide( event ) local sceneGroup = self.view local phase = event.phase if ( phase == "will" ) then -- Called when the scene is on screen (but is about to go off screen). -- Insert code here to "pause" the scene. -- Example: stop timers, stop animation, stop audio, etc. touchEnabled = false elseif ( phase == "did" ) then -- Called immediately after scene goes off screen. end end ----------------------------------------------------------- -- Create a basic display group function scene:destroy( event ) local sceneGroup = self.view end --------------------------------------------------------------------------------- -- Listener setup scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) scene:addEventListener( "hide", scene ) scene:addEventListener( "destroy", scene ) ----------------------------------------------------------------------------------------- return scene

Hi @escosiaharvey,

It appears that you’re not adding either “background” or “playBtn” to the Composer “sceneGroup” so they can be properly managed as part of the Composer scene.

Best regards,

Brent

Many thanks brent  :)

Hi @escosiaharvey,

It appears that you’re not adding either “background” or “playBtn” to the Composer “sceneGroup” so they can be properly managed as part of the Composer scene.

Best regards,

Brent

Many thanks brent  :)