- Messages
- 531
- Country
I am working on a gauge developed in JavaScript. I now need to have a flashing label and I don't know how to do this...
I used to work in C++ in the past (fs9/FSX/P3D) and I was using the ELPASED_SECONDS variable that was increased every 1/18 second. It was easy, I just had to use this timer to show the label every 0.5 second only, which was resulting in a flashing label.
Today, I don't find the equivalent of this variable in the Simvars available with MSFS and couldn't find any equivalent variable for the same effect. Maybe I can use the setInterval JavaScript function, but I am not sure this would be the most elegant solution, I'd rather base the flashing timer on the FS time.
Any idea to do this?
Thanks,
Eric
I used to work in C++ in the past (fs9/FSX/P3D) and I was using the ELPASED_SECONDS variable that was increased every 1/18 second. It was easy, I just had to use this timer to show the label every 0.5 second only, which was resulting in a flashing label.
Today, I don't find the equivalent of this variable in the Simvars available with MSFS and couldn't find any equivalent variable for the same effect. Maybe I can use the setInterval JavaScript function, but I am not sure this would be the most elegant solution, I'd rather base the flashing timer on the FS time.
Any idea to do this?
Thanks,
Eric