Skip to main content
Participating Frequently
Sep 16, 2019 12:41 PM UTC
Question

How to add tool-tip for fast forward button?

Hi Guys,

 

I am using captivate 2017(10.0.1.283).

I have added customized fast-forward button (using JavaScript) in my course and that is working fine, it is possible to add the tool-tip for that customized fast-forward button like captivate inbuilt fast-forward button?

 

Tool-tip: FastForward : '2x Fast Forward Speed',

FastForward1 : '4x Fast Forward Speed',

FastForward2 : 'Normal Speed',

 

Customized fast-forward button is working using below JavaScript

 

On first page enter

/* Create and set a counter to keep track of how many times the Fast Forward button was clicked */ 
if(typeof(buttonClickedCounter) === 'undefined') var buttonClickedCounter = 0; 
 
 
/* function used to fast forward x number of times */ 
function fastForward(repeatCall){ 
          /* Loop through to repeat the call */ 
          for(var i = 0; i < repeatCall; i++){ 
                    /* Execute the FF command in Cp */ 
                    document.Captivate.cpEISetValue('m_VarHandle.cpCmndFastForward', true); 
                    /* Increment our button click counter */ 
                    buttonClickedCounter++; 
                    /* If counter is 3 or more, reset it back to 0 since that's normal speed */ 
                    if(buttonClickedCounter >= 3) buttonClickedCounter = 0; 
          } 
} 
 
 
/* function used to normalize the speed of the course back to the standard fps */ 
function normalizeSpeed(){  
          /* Check how many times the button was clicked */ 
          switch(buttonClickedCounter){ 
                    /* It was clicked once */ 
                    case 1: 
                              /* Run the fastForward Command 2x to normalize the speed */ 
                              fastForward(2); 
                              break; 
                    /* It was clicked twice */ 
                    case 2:  
                              /* Run the fastForward Command 1x to normalize the speed */ 
                              fastForward(1); 
                              break; 
                    default : 
                              /* Do nothing */ 
          } 
}
 
on page exit
 
normalizeSpeed();
    This topic is closed to new replies. Start a new post to keep the conversation going.

    7 replies

    Participating Frequently
    Sep 16, 2019 2:19 PM UTC

    I have tried adding tool-tip using Hint option but how can we add 3 different tool-tip for 2x speed, 4x speed and Normal speed?

    Translate
    Inspiring
    Sep 16, 2019 2:22 PM UTC
    You could display a user variable in the hint box rather than static text, and populate that variable with the appropriate string whenever you switch playback speed.
    Translate
    Participating Frequently
    Sep 17, 2019 6:35 AM UTC
    Thanks Gaanf, It works successfully.
    Translate
    Inspiring
    Sep 16, 2019 12:56 PM UTC

    Is your button a Captivate Object on the stage (e.g. Captivate Button or Button-Shape)? If so, you can just check 'Hint' on the object's Properties/ Actions tab. That'd mimik a tool-tip.

    Translate
    Participating Frequently
    Sep 16, 2019 2:14 PM UTC
    Thanks Gaanf for quick respond.
    Translate