FORUMS: list search recent posts

How to loop a multiple numbers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Doni Donovan
How to loop a multiple numbers
on Oct 9, 2015 at 4:31:17 am

Hello sir could u help me in this case?
for example i have a slider, the value is 0. if i change value > 100 it should go back to 0. if value > 200 it go back to 0. if value > 300 it go back to 0, etc

sorry i just learn english

I only can make expression in once condition

(effect("Slider Control")("Slider") > 100) ? effect("Slider Control")("Slider") - 100 : (effect("Slider Control")("Slider")


Return to posts index

Dan Ebberts
Re: How to loop a multiple numbers
on Oct 9, 2015 at 5:11:58 am

I can't tell if this is what you're after:

effect("Slider Control")("Slider")%100

or if it's more complicated than that.


Dan



Return to posts index

Doni Donovan
Re: How to loop a multiple numbers
on Oct 9, 2015 at 7:16:40 am
Last Edited By Doni Donovan on Oct 9, 2015 at 7:20:23 am

Dont worry Dan finally i can found the formula :D
i spent 5 hour for create this expression and it make me (designer) crazy xD
so now i can slide like i want for get unlimited hue

Thanks Dan

inRGB =content("Group 1").content("Fill 1").color;
inHSL = rgbToHsl(inRGB);
a = effect("Slider Control")("Slider");
b= (a < 0) ? Math.abs(a+200): a;
c = b%200;
newHue = inHSL[0] +(c*0.005);
newHSL = [newHue, inHSL[1], inHSL[2], inHSL[3]];
hslToRgb(newHSL);


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]