You’ll need Expression Controls –
1)create a new comp and call it ExpressionController
2)create a Null and leave it at the default name of Null 1
3) apply effects>Expression Controls>SliderControl
4) goto the Null’s effects pane and select its name
5) Hit the Enter key on the main keyboard once and change its name from Slider Control 1 to maxScaleSlider Control. This slider will later be used to control the maxscale property of your Expression
6) repeat twice and rinse after each time for Nulls 2 and 3. The only thing to be mindful of are the name changes for the Slider Controls for Nulls 2 and 3. minScaleSlider Control and minScaleDistScaleSlider Control for the Slider Controls that you apply for Nulls 2 and 3 respectively.
// Start of Script
maxScale = Comp(“ExpressionController”).layer(“Null 1”).effect(“maxScaleSlider Control”)(“Slider”);
minScale = Comp(“ExpressionController”).layer(“Null 2”).effect(“minScaleSlider Control”)(“Slider”);
minScaleDist = Comp(“ExpressionController”).layer(“Null 3”).effect(“minScaleDistScaleSlider Control”)(“Slider”);
pointer = thisComp.layer(“pointer”);
d = Math.abs(pointer.transform.position[0] – transform.position[0]);
ease(d,0,minScaleDist,[maxScale,maxScale],[minScale,minScale])
// End of Script
HTH
Roland Kahlenberg
https://www.broadcastGEMs.com – Adobe After Effects project files
https://www.myspace.com/rorkrgbspace