How To Remove SlideView From A Scene With Composer?

hello guys, i am struggling on removing the whole scene in this specific scene where I have slideView code attached. basically i have howtoplay.lua where i tell people how to play the game, this is the code:

local slideView = require("slideView") local composer = require( "composer" ) local scene = composer.newScene() function scene:create( event ) local localGroup = self.view local testbutton = display.newImageRect ( "button-testing.png", 500, 500 ) testbutton.x = display.contentCenterX testbutton.y = display.contentCenterY / 2 localGroup:insert(testbutton) local myImages = { "howtoplay1.png", "howtoplay2.png", "howtoplay3.png", "howtoplay4.png", "howtoplay5.png" } slideView.new( myImages ) local function pencettestbutton ( event ) composer.removeScene("howtoplay") composer.gotoScene("menu", "fade", 400) return true end testbutton:addEventListener( "tap" , pencettestbutton ) return localGroup end function scene:show( event ) --composer.returnTo = "menu" end function scene:hide( event ) end function scene:destroy( event ) end --------------------------------------------------------------------------------- -- Listener setup scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) scene:addEventListener( "hide", scene ) scene:addEventListener( "destroy", scene ) --------------------------------------------------------------------------------- return scene

so what I want is, when I click that “testbutton”, i would remove howtoplay.lua and move back to menu.lua but the slideView (howtoplay1.png, howtoplay2.png, etc.) is still on the screen despite I have successfully moved back to menu.lua. I dont know what to do because I can’t insert slideView or myImages into localGroup. What to do so I can successfully remove the whole scene in howtoplay.lua and move back to menu.lua like no problem? Thanks.

Is slideView an officially supported library still? I’ve never come across it.

Anyway, I’m not at a dev machine but you could try this, assuming slideView.new returns a display object:

[lua]

local s = slideView. new ( myImages )

localGroup:insert(s)

[/lua]

ok it works now, thanks

Is slideView an officially supported library still? I’ve never come across it.

Anyway, I’m not at a dev machine but you could try this, assuming slideView.new returns a display object:

[lua]

local s = slideView. new ( myImages )

localGroup:insert(s)

[/lua]

ok it works now, thanks