ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression for scaling bar several times

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ed HomeExpression for scaling bar several times
by on Dec 13, 2013 at 8:32:31 pm

Hi there,

I hope somebody can help me, because I'm a newby...
I made a rectangle (bar) which has to increase and decrease several times, during 15 seconds.
Must look like it's fluctuating. I can do that by use keyframes, but because there are 15 bars fluctuating at the same time it's a lot of work (intention is to create a chart with fluctuating bars).
Does somebody know if there is an expression which I can use?

Edith


Return to posts index

Roland R. KahlenbergRe: Expression for scaling bar several times
by on Dec 15, 2013 at 9:25:39 am

Ensure that you first move the Anchor Point to the bottom edge of your bar. This ensures that scaling is anchored at the bottom of the bar.

Use the following script in a single layer's position -

bar_width = 120;
xScalar = (index-1)*bar_width;
x_Startvalue = 100;
y_value = 640; //floor value for the bars

[x_Startvalue+xScalar,y_value]

------------

Use this script for its scale prop

Scalar = transform.scale;
frequency = 2;
amp = 50;

[100,Scalar.wiggle(frequency,amp)[1]]

-------------------

Then simply duplicate the layer as many times as you need bars. Changing the variables (the numbers after the = sign in the scripts should be easy enough for you to customize the script).

HTH
RoRK

Intensive mocha & AE Training in Singapore and Other Dangerous Locations

Imagineer Systems (mocha) Certified Instructor
& Adobe After Effects CS6 ACE/ACI


Return to posts index

Ed HomeRe: Expression for scaling bar several times
by on Dec 15, 2013 at 6:29:25 pm

Sorry, one final question... The expression I paste works only in the height of the bar. But my bar only has to fluctuate on the length (it's a bar which is laying). So instead of the heigt it must be in the length. I tried to change code of the expression, but my knowlegde of expressions is not to good. Hope you cab help me again :-)

Edith


Return to posts index


Roland R. KahlenbergRe: Expression for scaling bar several times
by on Dec 15, 2013 at 11:45:14 pm

Parent the bar layers to a Null Object. Then use the Null's Rotation and Position to orientate and position the bars to suit your needs.

HTH
RoRK

Intensive mocha & AE Training in Singapore and Other Dangerous Locations

Imagineer Systems (mocha) Certified Instructor
& Adobe After Effects CS6 ACE/ACI


Return to posts index

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