Advertisement
Guest User

Untitled

a guest
Oct 26th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. var i = 0; // Start Point
  2. var images = [
  3. ['0.png', '1.png', '2.png'],
  4. ['2.png', '2,2.png', '2.png', '2,2.png', '2.png', '2,2.png', '2.png', '2,2.png', '2.png']
  5. ]; // Images Array
  6. var n = 0;
  7. // Change Image
  8. function loopPoses(){
  9. if (document.getElementById('Number').textContent !== '0')
  10. return;
  11.  
  12. if (n >= images.length) {
  13. return;
  14. }
  15. if (document.getElementById('Number').textContent !== '1'){
  16. if (i + 1 >= images[n].length) {
  17. i = 0;
  18. n++;
  19. return;
  20. }
  21. return;
  22. }
  23. // increase of one
  24. i++;
  25. document.getElementById('Number').innerHTML = '1';
  26.  
  27. setTimeout(function() {
  28. document.slide.src = images[n][i];
  29. loopPoses();
  30. }, 300);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement