Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesCreative Cloud DebateFAQ

clamping a slider value but having two different effects for 'above' and 'below' the limits

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
Respond to this post   •   Return to posts index   •   Read entire thread


jim lefevreclamping a slider value but having two different effects for 'above' and 'below' the limits
by on Mar 14, 2012 at 11:57:01 am

I've not really used the clamp expression much so I may be starting on the wrong footing here but...

I have a slider (CLOUD_position_DRIVER) with values 0 to 100

when CLOUD_position_DRIVER < 0 I want CLOUD_position value = 0
and
when CLOUD_position_DRIVER > 100 I want CLOUD_position value = 100

but obviously in between those two ranges (CLOUD_position_DRIVER between 0 and 100) I want the position to be a variable value.

So basically I want to clamp it so that below a certain value it reads a fixed first state, between the value a variable state and after a certain value a third fixed state (different to the first fixed state).

I've tried...

if (effect("CLOUD_position_DRIVER")("Slider")<0) {0} else {value};
if (effect("CLOUD_position_DRIVER")("Slider")>100) {100} else {value};

but it's not working, or rather the second statement is working but not the first! Which is why I was thinking that the clamp thing might be something I need? Maybe not?!

!

many thanks in advance

jim

http://www.jimlefevre.com


Posts IndexRead Thread
Reply   Like  
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]