Hi,
Id like to know please, con can I convert a format time like 0.2s to its equivalent in format '00:00:06' and after all, comparing between two new format times like:
if('00:00:06' < '00:00:09'){}
Thanks to all of you!
Hi,
Id like to know please, con can I convert a format time like 0.2s to its equivalent in format '00:00:06' and after all, comparing between two new format times like:
if('00:00:06' < '00:00:09'){}
Thanks to all of you!
This thread has a solution from @MarkHunte Showing the timecode in the document - #7 by MarkHunte
// Run this every 100 milliseconds
window.setInterval(function(){
// Gets the raw timecode in seconds and fractions of a second
var timecodevalue = hypeDocument.currentTimeInTimelineNamed('Main Timeline');
// Hype has 30 frames a second
var fps = 30;
var totalSeconds = Math.floor(timecodevalue);
var hours = Math.floor(totalSeconds /3600);
var minutes = Math.floor((totalSeconds - hours*3600)/60);
var seconds = totalSeconds - (hours*3600 + minutes*60);
// This subtracts the value in seconds from the raw timecode value and converts it to a two number with no decimal points.
var frames = ((timecodevalue - totalSeconds) * 30).toFixed(0);
// Raw number of seconds:
document.getElementById("timecode").innerHTML = timecodevalue;
// Seconds + Frames
// document.getElementById("timecodeWithFrames").innerHTML = seconds.toString() + ' ' + frames.toString();
document.getElementById("timecodeWithFrames").innerHTML = hours + ' : ' + minutes + ' : ' + seconds + ' : ' + frames;
}, 100);