Skip to main content
Known Participant
June 24, 2014
Answered

Informatics Slider Widget

  • June 24, 2014
  • 1 reply
  • 831 views

Hi I have used informatics slider widget may I add this is cool. My only problem is it does not do fractions. I have set the slider max count to 6. I've added another a variable to show the slide counter in movement. I've also added another variable which I used in a conditional action which should change to the fractions I want to use but this does not work. I'm not sure if this logic is correct or not? Any advice much appreciated. Thanks

    This topic has been closed for replies.
    Correct answer RodWard

    The Slider Component Widget works with Captivate variable values.  However, Captivate variables are only either integers (whole numbers) or strings (text).  If you insert a value such as 0.5 or 0.25, Captivate will interpret this as a string since it's not a whole number.

    So you need to use variables with whole number values.  And from the sound of it, you'll need to adjust the design of your interaction to work this way.

    1 reply

    RodWard
    Community Expert
    RodWardCommunity ExpertCorrect answer
    Community Expert
    June 25, 2014

    The Slider Component Widget works with Captivate variable values.  However, Captivate variables are only either integers (whole numbers) or strings (text).  If you insert a value such as 0.5 or 0.25, Captivate will interpret this as a string since it's not a whole number.

    So you need to use variables with whole number values.  And from the sound of it, you'll need to adjust the design of your interaction to work this way.

    MArif2014Author
    Known Participant
    June 25, 2014

    Rod would it be possible to show me an working example of this proposed solution I'm not so sure I follow. Are you saying this would be a conditional action? widget variable = is say eaqual value (1-4) then my variable is "equal to" empty, quarty, half, full. Thanks

    RodWard
    Community Expert
    Community Expert
    June 25, 2014

    Take a look at this tutorial by Tristan that explains how Variable Binding works with a Component widget like the Slider or Rotator widgets:

    http://www.youtube.com/watch?v=rDijYxd3WyQ&src

    You can control how much one object slides in comparison to the other via the length of their respective tracks.  So for example if the slide being used as the Handle has a track that is 100 pixels in length and it is linked to drive another slider that has a track of 300 pixels in length, but they are both bound to the same user variable, then moving one the main slider handle 100 pixels will move the other object 300 pixels.

    You can use this same principle to get your fractional differences.

    Another alternate method that is a bit trickier and more advanced is to use the Component widget's ability to be an Interactive widget that can evaluate Success or Failure on every frame.  You just need to turn on Evaluation in the widget properties dialog and set it to evaluate Continually.  Then you need to use its On Success event to execute an Advanced Action that manipulates the value of one user variable in relation to another.  For example, if you have one slider bound to VariableA and the other bound to VariableB, you could have the slider evaluating continually and executing an action that used an Expression to multiply VariableA's value by some amount and then Assign that value to VariableB.

    Like I said...it's a bit advanced.  So you might struggle to pull that off.  But it's all possible with Captivate and the Component widgets.