• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Expressions not working

Explorer ,
Apr 13, 2017 Apr 13, 2017

Copy link to clipboard

Copied

I've just started looking in adding spring expressions to save time on animation and i've copied a few expressions off website to get a nice bounce an all so far don't want to work. I keep getting an error. See attached. Am i missing something fundamental??Screen Shot 2017-04-13 at 16.08.01.png

Views

860

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 13, 2017 Apr 13, 2017

Copy link to clipboard

Copied

We can't know. Show us the full expression code and explain exactly where you are applying it. also, by all means start by renaming your layers and comps suitably. Wrongly handled named references often cause all sorts of issues.

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 13, 2017 Apr 13, 2017

Copy link to clipboard

Copied

Below is the expression i copied from a site and i was just trying to apply it to a scale on some text (For small-to-medium sized enterprises)

n=0;

if(numKeys>0){n=nearestKey(time).index;if(key(n).time>time){n--;}}

n==0?t=0:t=time-key(n).time;

freq=1/duration;

mult = (bounces-Math.floor(t*freq))/bounces;

if (n>0 && mult>0) {

  v=velocityAtTime(key(n).time-0.001)*amp; //velocity to use

  b=Math.abs(Math.sin(freq*t*Math.PI))*Math.pow(mult,decay); //bounce calculation

  value-v*b;

} else {value;}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 14, 2017 Apr 14, 2017

Copy link to clipboard

Copied

LATEST

What site was it? I don't think you have the full code copied.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines