Adobe Animate CC 2021 TUTORIAL - setTimeout-function - JavaScript in HTML5 canvas

Опубликовано: 18 Октябрь 2024
на канале: MotionTuts
6,519
72

Hello, In this quick tutorial, i will show you how to make setTimeout function in Adobe Animate CC 2021.
Here is the code that we used :

this.btn1.addEventListener("click", hideShapes);
let root = this;

function hideShapes () {
root.blue1.visible=false;
setTimeout (
function () {
root.red1.visible=false;
}, 2000

)}

//setTimeout(function(){ alert("Hello"); }, 3000);

here is the link for the setTimeout :
https://www.w3schools.com/jsref/met_w...

thank you for your time :)