-
Error with expression when using slider to control image visibility
Hi All.
I have been looking at how to use the slider function in After Effects to toggle visibility of backgrounds. There are a couple of posts on this forum but I just can’t seem to get the expression to work.
This is what I have done:
1. Created a null object and called it “BG Controller”
2. Dropped a slider effect onto it
3. Added an expression to the opacity property of the images (see below)
4. After Effects says there is an error in the expression and it doesn’t workThe slider range has been set to 1 through 3.
Any reason why this wouldn’t work?
ctrl = thisComp.layer("BG Controller").effect("Slider Control")("Slider");
if ( Math.floor( ctrl ) == 1 ) 100 else 0;