Button only working once
Hello!
So I've got this button set up in Animate CC with HTML that I'm going to use for navigating forward to "next slide". However, this function does only work the first time I press the button. What's wrong?
- In actions @ frame 1 of main timeline (labels are in Norwegian)
this.Knapp.addEventListener("click", fl_ClickToGoToAndStopAtFrame.bind(this));
function fl_ClickToGoToAndStopAtFrame() {
if (this.Tekstboks.currentFrame = "Intro") {
this.Tekstboks.gotoAndStop("Spredning");
} else if (this.Tekstboks.currentFrame = "Spredning") {
this.Tekstboks.gotoAndStop("Reaksjon1");
} else if (this.Tekstboks.currentFrame = "Reaksjon1") {
this.Tekstboks.gotoAndStop("ElBevegelse");
} else if (this.Tekstboks.currentFrame = "ElBevegelse") {
this.Tekstboks.gotoAndStop("Reaksjon2");
} else if (this.Tekstboks.currentFrame = "Reaksjon2") {
this.Tekstboks.gotoAndStop("Reaksjon3");
} else if (this.Tekstboks.currentFrame = "Reaksjon3") {
this.Tekstboks.gotoAndStop("Samtidig");
} else if (this.Tekstboks.currentFrame = "Samtidig") {
this.Tekstboks.gotoAndStop("Elektrisitet");
} else if (this.Tekstboks.currentFrame = "Elektrisitet") {
this.Tekstboks.gotoAndStop("Likevekt");
} else if (this.Tekstboks.currentFrame = "Likevekt") {
this.Tekstboks.gotoAndStop("Slutt");
} else if (this.Tekstboks.currentFrame = "Slutt") {
this.Tekstboks.gotoAndStop("Intro");
}
}