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

Back Next button with continuously moving loop

$
0
0

I have a continuously moving looping slide show that has back and next buttons. When you press the next button it should move forward one where ever it is on the timeline every time you click it and the same for the back button.

 

This is the code I am using but the the problem is that it goes to else {sym.play("one");} when the button is clicked. No matter where in the timeline the next button is clicked, it goes back to number one.  I don't know much about coding and I have tried everything to fix this but I am stuck.

 

 

 

var pos = sym.getPosition()

if (pos <= "one"){

          sym.play("twenty");

}

else if (pos <= "two"){

          sym.play("three");

}

else if (pos <= "three"){

          sym.play("four");

}

else if (pos <= "three"){

          sym.play("four");

}

else if (pos <= "four"){

          sym.play("five");

}

else if (pos <= "five"){

          sym.play("six");

}

else if (pos <= "six"){

          sym.play("seven");

}

else if (pos <= "seven"){

          sym.play("eight");

}

else if (pos <= "eight"){

          sym.play("nine");

}

else if (pos <= "nine"){

          sym.play("ten");

}

else if (pos <= "ten"){

          sym.play("eleven");

}

else if (pos <= "eleven"){

          sym.play("twelve");

}

else if (pos <= "twelve"){

          sym.play("thirteen");

}

else if (pos <= "thirteen"){

          sym.play("fourteen");

}

else if (pos <= "fourteen"){

          sym.play("fifteen");

}

else if (pos <= "fifteen"){

          sym.play("sixteen");

}

else if (pos <= "sixteen"){

          sym.play("seventeen");

}

else if (pos <= "seventeen"){

          sym.play("eighteen");

}

else if (pos <= "eighteen"){

          sym.play("nineteen");

}

else if (pos <= "nineteen"){

          sym.play("twenty");

}

else {

          sym.play("one");

}


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>