How to trigger timeline/action with two clicks/actions


(numnum suh) #1

Hello, I have searched for a similar question, but could not find any.
I am trying to trigger an action after playing two videos, or other actions.
The appearing action is very simple, it just has to show opacity to 100%.

If it is a javascript can you tell me the exact code.

Thank you for your support


#2

Hi @kasou227

you want to call the action using a “onended” event for the video.

This assumes you have a variable stored for your video (with an ID of ‘myVideo’).

var video = hypeDocument.getElementById('myVideo');

video.onended = function () {
    hypeDocument.startTimelineNamed('**your timeline**'); // animation that animates opacity OR
    **your element**.style.opacity = 1.0; // opacity 1.0 = 100% 0.5 = 50%, etc
}