Hi, I'm new to roku .I want to build a subscription process that includes 5 different layouts. Now i have all the 5 components in the scene created from the 'main.brs' and switching pages using interface . But it is not working as expected. What is the suggested way of building such a layout ? Please help me solve this.
App has a subscription process with 5 phases starts from home page .Every layout has positive and negative buttons.
1)I want to switch the layouts according to the button presses. 2)After the subscription process need to return to homepage. 3)To allow back button navigation in between the subscription process. 4)Home page contains two other buttons except subscription button.
Now i'm using interfaces to mange the layouts as follows.
1) Created scene "Homepage" from "main.brs" 2) Home page contains 3 buttons and 5 components for the 5 different subscription phases. 3) "Hompage.xml" has 5 interface fields of type string to communicate between 5 components. 4) When user press subscription button app now shows the first component and set focus. 5) When user press negative or positive button -Write a value to the interface field. -Home page gets the value. -Shows the next component and set focus. 6)When user press back button shows previous component.But failed to write to interface field.
Am i using wrong way to build this ?
What is the preferred way of building and managing this kind of layout ?
Thank you for your help and sorry about the confusion. I have described above the requirements of the app and how i built the lay out . I just want to know the suggested way building this kind of layout.
Can i put all the components in scene ? Or have to create, append and remove roSG nodes as needed ? Or is there a better solution ?
m.firstpage = m.top.findNode("firstpage") m.step1 = m.top.findNode("step1") m.step2 = m.top.findNode("step2") m.trial.ObserveField("buttonSelected", "startsignup") end sub
currentval = m.top.subscriptionStep1 ? "transition";currentval if currentval = "accept" m.step2.visible=true m.step1.visible=true m.step2.setFocus(true) end if if currentval = "cancel" m.firstpage.visible= true end if