hi all,
So it took me a while but I found my answer. I just wanted to share my solution so it may (or not) help others. If you have any ideas on how to achieve the same effect in a better way i would love to hear. Anyway here’s the project.
Basicly I made a variable which can be incremented or decremented by 2 buttons. On every pointerdown it reads the number en if it’s matches a IF statement it activates the defined state.
Go to next state|690x489
// defined a var to count at wich state the controller was
var start = 1;
symbol.nodes.Terug_Navigatiepijl0.on("pointerdown", (e) => {
// Runs when pointerdown occurs on the Terug_Navigatiepijl0 node
if (start > 1){
start--;
if (start == 1){symbol.controllers.Content_1.elements.n16.activate();}
if (start == 2){symbol.controllers.Content_1.elements.n26.activate();}
if (start == 3){symbol.controllers.Content_1.elements.n36.activate();}
if (start == 4){symbol.controllers.Content_1.elements.n46.activate();}
if (start == 5){symbol.controllers.Content_1.elements.n56.activate();}
if (start == 6){symbol.controllers.Content_1.elements.n66.activate();}}
});
symbol.nodes.Verder_Navigatiepijl.on("pointerdown", (e) => {
// Runs when pointerdown occurs on the Verder_Navigatiepijl node
if (start < 6){
start++;
if (start == 1){symbol.controllers.Content_1.elements.n16.activate();}
if (start == 2){symbol.controllers.Content_1.elements.n26.activate();}
if (start == 3){symbol.controllers.Content_1.elements.n36.activate();}
if (start == 4){symbol.controllers.Content_1.elements.n46.activate();}
if (start == 5){symbol.controllers.Content_1.elements.n56.activate();}
if (start == 6){symbol.controllers.Content_1.elements.n66.activate();}
}
});