Skip to main content
DeannaMarcovitch
Participant
February 21, 2018
Answered

Click box accepting single click and double click

  • February 21, 2018
  • 2 replies
  • 714 views

Hi. I'm wondering if there's a way to program a click box to accept both a single click and a double click. A single click will progress to one slide. A double-click will progress to a different slide. Thanks.

This topic has been closed for replies.
Correct answer Gaanf

Here's a solution that requires one simple line of js, but is otherwise completely built from Advanced Actions:

Create a user variable v_countClicks and give it a default value of 0

Create an invisible interactive object somewhere on the slide (I always use SmartShapes used as buttons), name it Action_Shape, hide it from the output and assign it the following Advaced Action (I called mine a_Action):

On the actual click box that should trigger the SingleClick or DoubleClick actions respectively, put the following Advanced Action (I called mine a_Trigger):

The JavaScript just being this one line, ran on the current window:

     cp.clickHandler(Action_Shape);

Delay Next Action By controls the 'sensivity' of doubleclick detection. One can play with it to set it as low as possible and as high as necessary, as of course the actions will be executed with this delay.

2 replies

GaanfCorrect answer
Inspiring
February 22, 2018

Here's a solution that requires one simple line of js, but is otherwise completely built from Advanced Actions:

Create a user variable v_countClicks and give it a default value of 0

Create an invisible interactive object somewhere on the slide (I always use SmartShapes used as buttons), name it Action_Shape, hide it from the output and assign it the following Advaced Action (I called mine a_Action):

On the actual click box that should trigger the SingleClick or DoubleClick actions respectively, put the following Advanced Action (I called mine a_Trigger):

The JavaScript just being this one line, ran on the current window:

     cp.clickHandler(Action_Shape);

Delay Next Action By controls the 'sensivity' of doubleclick detection. One can play with it to set it as low as possible and as high as necessary, as of course the actions will be executed with this delay.

Participant
March 5, 2018

Wow! I've been wondering for ages how to do this, and your solution is excellent! I'm by no means an expert in Captivate, but even I was able to set this up and it's now working fine.

Many thanks!

Lilybiri
Legend
February 21, 2018

This is ot possible out of the box, maybe by using Javascript or the CpExtra widget by InfoSemantics.