How to Detect Mouse Button Down and Mouse Button Up Events

I would like to be able to detect mouse down and mouse up events.  Want to determine if a user pressed a control and held it down for 3 seconds before releasing the control.  On the surface the existing Storyline Events seem inadequate to accomplish what I need.

Anybody have a way to detect mouse down and mouse up events?

5 Replies
Matthew Bibby

I don't think this is possible in Storyline.

However, depending on how you'd be using this, you could create a button or whatever in HTML and use JS to track what's happening with the mouse, then you could communicate this back to Storyline via a variable. 

If you can provide some further info on how you will be using this I can probably mock up a demo for you at some stage.

Gavin Elliott

I know this is an old thread, but hopefully this is helpful to someone. It is possible to detect a mouse 'click' or a 'mousedown' or any other DOM event using Javascript. In the example below I asked the module to listen out for 'mousedown' and if the target was the scrollbar then some variable in Storyline is adjusted. 

document.addEventListener('mousedown', function(e) {
      let myClass =;
      if (myClass === 'scrollarea-btn') {
            var player = GetPlayer();