Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var i = 0; // Start Point
- var images = [
- ['0.png', '1.png', '2.png'],
- ['2.png', '2,2.png', '2.png', '2,2.png', '2.png', '2,2.png', '2.png', '2,2.png', '2.png']
- ]; // Images Array
- var n = 0;
- // Change Image
- function loopPoses(){
- if (document.getElementById('Number').textContent !== '0')
- return;
- if (n >= images.length) {
- return;
- }
- if (document.getElementById('Number').textContent !== '1'){
- if (i + 1 >= images[n].length) {
- i = 0;
- n++;
- return;
- }
- return;
- }
- // increase of one
- i++;
- document.getElementById('Number').innerHTML = '1';
- setTimeout(function() {
- document.slide.src = images[n][i];
- loopPoses();
- }, 300);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement