Forum Replies Created

Page 964 of 1081
  • You can use something like this (you’ll have to adjust the first four parameters to fit your project):

    minAudio = 0;
    maxAudio = 15;
    minScale = 10;
    maxScale = 100;

    myAudio = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    temp = linear(myAudio, minAudio, maxAudio, minScale, maxScale);
    [temp, temp, temp]

    Dan

  • Dan Ebberts

    August 23, 2007 at 5:01 pm in reply to: How to obtain an expression later in time

    Sorry – I messed it up. That’s what I get for postiing without testing. This should be better and shouldn’t need any adapting (if I’ve understood your requirements).

    delay = 10; //number of frames to delay

    idx = Math.floor((index-1)/3);
    d = delay*thisComp.frameDuration*(idx);
    thisComp.layer(1).opacity.valueAtTime(time – d)

    Dan

  • Dan Ebberts

    August 23, 2007 at 4:26 pm in reply to: Kung-Fu Script Request

    I haven’t seen anything quite like that, but it should be mostly doable, althoug it will be a little trickier than it ought to be. You essentially need to create the string that would be created by the pickwhip for each property. Jeff Almasol’s rd_GimmePropPath script should be helpful and would be a good place to start.

    Very interesting idea, by the way.

    Dan

  • Dan Ebberts

    August 23, 2007 at 1:37 pm in reply to: Countdown expression help

    Something like this, maybe:

    beginTime = 1;
    endTime = 15;

    linear(Math.floor(time) , beginTime, endTime, 0, 100 )

    Dan

  • Dan Ebberts

    August 22, 2007 at 8:19 pm in reply to: How to obtain an expression later in time

    Try this variation:

    delay = 10; //number of frames to delay

    idx = index%3;
    d = delay*thisComp.frameDuration*(idx – 1);
    thisComp.layer(1).opacity.valueAtTime(time – d)

    Dan

  • Dan Ebberts

    August 22, 2007 at 5:11 pm in reply to: How to obtain an expression later in time

    It sounds like your linked layer is layer 6. That would give it a delay of 50 frames. For a 10 frame delay, the expression assumes that it would be layer 2. There are, of course, ways to solve the problem – it just depends on what you’re trying to do.

    Dan

  • Dan Ebberts

    August 22, 2007 at 1:19 am in reply to: Loop_out Dropframe

    To get “cycle” to loop smoothly, the last keyframe value needs to be the same as the first. More info here:

    https://library.creativecow.net/articles/ebberts_dan/layer_looping.php

    Dan

  • Dan Ebberts

    August 21, 2007 at 2:07 pm in reply to: Static Random Number

    seedRandom(index,true);
    myValue = random(50) ;

    Dan

  • Dan Ebberts

    August 20, 2007 at 6:34 pm in reply to: Null linking

    Try this:

    maxDist = 200;

    p = thisComp.layer(“Null A”).transform.position;
    v = transform.position – p;
    if (length(v) > maxDist){
    p + normalize(v)*maxDist
    }else{
    value
    }

    This assumes neither null has a parent.

    Dan

  • The expression has to be applied to the camera’s focus distance, so you’ll need to add some code to manage defining the current target layer. If you have CS3, I think I’d do it with marker comments, where the comment would have the name of the current target layer. If you want to try that and need help with the code, just let us know.

    The orientation of the target object shouldn’t matter.

    Dan

Page 964 of 1081

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