Oscillating Popup

Moderators: Disciple, zlovatt

Post Reply
Travis
Posts: 2
Joined: September 13th, 2006, 7:57 pm

I am a beginner and I would to create some popup text with an uniformly scaled oscillating
popup effect that stabilizes out quickly and smoothly, somewhat like a popping bubble.
I'm sure you have seen this effect applied to text or graphics before. If not, I can find
a reference somewhere.

How would I do this?
gimmel
Posts: 7
Joined: January 13th, 2006, 5:35 am

Put this code into the scale property:

Code: Select all

comein=Math.min(time*4,1)
decay=Math.exp(-time*4);
swing=Math.cos(time*24)*60;
sc=(100+swing*decay)*comein;
[sc,sc]
I hope that is what you were looking for.
gimmel
Posts: 7
Joined: January 13th, 2006, 5:35 am

Sorry, forgot something!

The last script only works if the layer starts at the compositions beginning.
With this script you can move the layer in time. The animation will start at layer start.

Code: Select all

layertime=time-startTime;
comein=Math.min(layertime*4,1)
decay=Math.exp(-layertime*4);
swing=Math.cos(layertime*24)*60;
sc=(100+swing*decay)*comein;
[sc,sc]
Travis
Posts: 2
Joined: September 13th, 2006, 7:57 pm

Thanks, that's exactly what I was looking for! :D

I also placed the same expression in the Opacity property to make it appear a little bit smoother.

btw, I just recently discovered this page, and it has a jiggle expression,
which is somewhat what I was looking for, but not exactly:

http://www.motionscript.com/mastering-e ... ics-3.html

Code: Select all

freq = 3; 
amplitude = 35; 
decay = 1.0; 
s = amplitude*Math.sin(freq*time*2*Math.PI)/Math.exp(decay*time);
scale + [s,s]
But your expression uses terms differently. I guess it doesn't matter if you're
using a sin or cos wave. They divide by exp(), while you multiply it.
Post Reply