ScrollView Scene Change

I’m having a problem with changing scenes from my scrollView. I have set it so that if you tap anywhere on the screen, the scene will change. However, the scene is failing to change every time, with the error:

Runtime error

?:0: stack overflow

stack traceback:

[C]: in function ‘?’

?: in function ‘removeSelf’

/Users/ravi/APP_DEV/Star Guardian/cleangroup.lua:92: in function ‘remove’

?: in function ‘removeSelf’

/Users/ravi/APP_DEV/Star Guardian/cleangroup.lua:92: in function ‘remove’

?: in function ‘removeSelf’

/Users/ravi/APP_DEV/Star Guardian/cleangroup.lua:92: in function ‘remove’

?: in function ‘removeSelf’

/Users/ravi/APP_DEV/Star Guardian/cleangroup.lua:92: in function ‘remove’

?: in function ‘removeSelf’

/Users/ravi/APP_DEV/Star Guardian/cleangroup.lua:92: in function ‘remove’

?: in function ‘removeSelf’

?: in function ‘?’

?: in function ‘?’

?: in function ‘removeSelf’

/Users/ravi/APP_DEV/Star Guardian/director.lua:355: in function ‘rebuildGroup’

/Users/ravi/APP_DEV/Star Guardian/director.lua:918: in function ‘fxEnded’

/Users/ravi/APP_DEV/Star Guardian/director.lua:1229: in function ‘?’

?: in function ‘?’

?: in function <?:467>

?: in function <?:218>

Nowhere in my code am I using the cleangroup library or removeSelf method. Here is my code for the scene change:

[lua]

local function handleButtonEvent( event )

–print(“YES!”)

    local phase = event.phase

   

    if (phase == “ended”) then

    --storyboard.gotoScene(“menu”, “fade”, 500)

    director:changeScene(“menu”, “fade”)

        audio.stop(menuSoundtrackChannel)

audio.dispose(menuSoundtrack)

menuSoundtrack = nil

    end

   

    if ( phase == “moved” ) then

        local dy = math.abs( ( event.y - event.yStart ) )

        – If the touch on the button has moved more than 10 pixels,

        – pass focus back to the scroll view so it can continue scrolling

        if ( dy > 10 ) then

            scrollView:takeFocus( event )

        end

    end

    return true

end

background:addEventListener(“touch”, handleButtonEvent)

[/lua]

I’m using the director class to handle my scene transitions.

Can someone please tell my why this is happening? I’m still not able to figure out why. Thanks so much.

I still haven’t been able to find a fix.

Can someone please help me with this? 

 

Hello @ravipsr,

If I recall, “cleangroup.lua” is part of Director and is not related to Corona’s widget library in any way. Unfortunately, I cannot provide assistance specifically, because Director is an old library and has not been supported by the original author for a long time. Most developers have migrated to Composer (or Storyboard) by now, the former being the official Corona-supported scene management library.

Best regards,

Brent

I see, that’s unfortunate. Thanks for your help, Brent. 

I still haven’t been able to find a fix.

Can someone please help me with this? 

 

Hello @ravipsr,

If I recall, “cleangroup.lua” is part of Director and is not related to Corona’s widget library in any way. Unfortunately, I cannot provide assistance specifically, because Director is an old library and has not been supported by the original author for a long time. Most developers have migrated to Composer (or Storyboard) by now, the former being the official Corona-supported scene management library.

Best regards,

Brent

I see, that’s unfortunate. Thanks for your help, Brent.