Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions repetitive ringing/shaking of an old -fashioned mechanical clock

  • repetitive ringing/shaking of an old -fashioned mechanical clock

    Posted by Liviu Ispasoiu on August 13, 2014 at 3:22 pm

    Hi, I’m looking for an expression that helps me to animate an old-fashioned clock, shaking and jumping like mad, at each N seconds. The duration of ringing is about 1 second, then the shaking will stop for a couple of seconds. Then it starts again… and so on.
    Thank you!

    Liviu Ispasoiu replied 11 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Anders Hattne

    August 14, 2014 at 8:27 am

    This is far from a complete answer, something I did a while ago to practise. Maybe you can modify it to make it work for you.
    Usually when I don’t understand what values my variables have I put the expression in a text layer to see what’s going on!

    …or maybe someone will give you a better answer later!
    win=2;
    out=8;
    rise=1;

    a=100;

    if (time >win && time <= out ){
    a=ease(time,win, win+rise, 0 ,a);
    wiggle(1, a);
    }

    else if (time > out ) {
    a=ease(time, out, out+rise, a ,0)
    wiggle(1, a)
    }

    else
    transform.position

    http://www.ardillamedia.com

  • Liviu Ispasoiu

    August 14, 2014 at 12:00 pm

    You gave me an idea using condition. Also I found something and tried to adapt to my case. Not sure if the developers have different thought but it works fine for me.
    Thank you!

    tDur = 0;
    i = 0;
    while (time >= tDur){
    i +=1;
    if (i%2){
    tDur+=1; //ringing for one second
    p = [transform.position[0], transform.position[1]-20];
    p+ random([8,8]);
    }else{
    tDur+=2;//hold for two seconds
    value;
    }
    }

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy