Copy link to clipboard
Copied
Hello, I apologize if this question has already been posted... I'm trying to make a basic time/date in Animate. If I use this.tf.text = new Date(); where tf is a dynamic text field, the .fla displays what I want. My question is, is it possible to put this in a function and then use setInterval to essentially get a real time display? If so, can someone help with the code? I'm a mechanic by trade and hitting it with a hammer isn't working....
Copy link to clipboard
Copied
any loop will work.
setInterval(updateF.bind(this),500);
function updateF(){
this.tf.text=new Date(); // you'll probably want to format this
}
Copy link to clipboard
Copied
Works beautifully, thank you!
Copy link to clipboard
Copied
you're welcome.