Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Using different states of a info button?

$
0
0

     Hi, im making a mobile app using Edge Animate and i ran into a problem. There is a info button that remains visible on all pages, but the thing is that i want it to display different content depending on the page the user is at. For example, if he clicks the info button while on page Music, it should create a specific help window for that page.

     I already tried creating a variable that gets changed at every different page and adding an if statement on the info symbol timeline to check the variable's value, so it knows when to play each specific content, but its doesn't seem to work.

 

here's what i have on my canvas code window:

 

sym.setVariable("info", 0);

 

them when the timeline reaches any specific page the variable gets changed:

 

var infoVar = sym.getVariable("info");

infoVar = 1;

 

 

sym.setVariable("info", "infoVar");

 

The info symbol has a specific timeline, so theres a trigger that checks the variables value:

 

var infoVar = sym.getVariable("info");

 

 

if(infoVar == 1) {

  sym.play("Calendar");

}

else if(infoVar == 2) {

  sym.play("Music");

}

else if(infoVar == 3) {

  sym.play("Calculator");

}

else if(infoVar == 4) {

  sym.play("Shop");

}

else {

sym.stop();

 

 

}

 

Any suggestions??


Viewing all articles
Browse latest Browse all 9897

Trending Articles