I just try to use a Button to use for a MorseCode. I read already in different topics how to use JavaScript to click in order, but i want to use just one Button to press short or long.
Is this type of click/press possible? Or has it to be done with JavaScript?
In this example, I have a timeline run when I hold on an element, and when I release my hold, I detect how long that timeline has run:
hypeDocument.currentTimeInTimelineNamed('HoldTimeline')
var PressDuration = hypeDocument.currentTimeInTimelineNamed('HoldTimeline');
if (PressDuration >= 3) {
alert('long press');
// you could run a timeline here?
} else {
alert('short press');
// or do some other function here...
}