• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Linking/limiting slider expression controls

New Here ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

I have created two sliders, one which will control the start point of a layer (if then statement looks at the time of the CTI and the slider time, in seconds) and if the CTI is greater than the slider time, then the opacity is set to 100) and the other to control the end point of the same layer (same thing as the start point, except it turns the opacity to 0).

JeffC_0-1709073662049.png



I would like to set it up so that if, say the end slider is set to 15 seconds, then the start slider either cannot move further than 15 or the start slider "pushes" the end slider higher up the scale. What happens now is that the start time can be set after the end time, which simply prevents the opacity from changing.

JeffC_1-1709073738283.png


I'm not sure if it's possible to limit the movement of a slider based on another slider's value, or move a slider based on another slider's value, but if it is, please let me know.

Additionally, if there's another method instead of using two sliders, please feel free to share, but I'd rather keep with this, unless the other method is something like two sliders in one.

I hope this made sense.

TOPICS
Expressions , How to , User interface or workspaces

Views

65

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Feb 27, 2024 Feb 27, 2024

Try this:

Start Time Slider:

endTime = effect("End Time")(1);
Math.min(value,endTime)

 

End Time Slider:

startTime = effect("Start Time")(1);
Math.max(startTime,value)

Votes

Translate

Translate
Engaged ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

Try this:

Start Time Slider:

endTime = effect("End Time")(1);
Math.min(value,endTime)

 

End Time Slider:

startTime = effect("Start Time")(1);
Math.max(startTime,value)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 29, 2024 Feb 29, 2024

Copy link to clipboard

Copied

LATEST

Works great! Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines