Storyboard Scene Transitions

Class AA (Scene)

– initialize class A view (init function contains view1)

local A\_t=require("A") function scene:createScene(event) local AA\_view=A\_t.init() group:insert(AA\_view) end

Class BB (Scene)

– contains a back buttons that gotoScene(“A”)

– but problems stands that when i go back at SceneA i want to show A.view2 at this moment not A.view1      as A_t.init() does.

local options={effect="fade", time=500} storyboard.gotoScene('A', options)

Class A:

–its one view with 2 subviews: view1 & view2

–view1: contains  2 buttons

–view2: contains 4 buttons and a back buttons that goes back to view1

local A={} function A.init() A.view=display.newGroup() A.view1= (...) A.view:insert(A.view1) return A.view end function A.view2() A.view2 = (...) --back button of view2 calls A.goback() A.view:insert(A.view2) end function A.goback() A.view1:removeSelf() A.view2 = (...) A.view:insert(A.view2) end return A