Forum Replies Created

Page 37 of 46
  • Colin Braley

    November 10, 2005 at 12:39 am in reply to: Expression for circles following a curved path?

    Michael –
    I’ve got an expression that seems to work pretty well, but I’m not sure if it is exactly what you are looking for. Just keyframe the position of the first layer and then apply this expression to the position property of all the other circles (they must be directly below the other circles in the timeline because the expression relies on layer indicies). Well, here is the expression:

    //Begin expression
    offSet = 500;//In pixels
    //—–
    frame = timeToFrames(time);
    prevPos = thisComp.layer(index – 1).position;
    var finalPos;
    //–
    function getPrevPosAtTime( f )//Time in frames is passed to the function
    {
    return prevPos.valueAtTime( framesToTime( f ));
    }
    //–
    var bestFrame = 0;
    //–
    for(i = 0; i < frame; i++) { curr = length(getPrevPosAtTime( i ), prevPos); currError = Math.abs(curr - offSet); oldCurr = length(getPrevPosAtTime( bestFrame), prevPos); oldError = Math.abs(oldCurr - offSet); if(currError < oldError) bestFrame = i; } //-- getPrevPosAtTime( bestFrame ) //End expression I think that expression should get you headed in the right direction. If you have any trouble with it post again. ~Colin

  • Colin Braley

    November 9, 2005 at 11:02 pm in reply to: expression problem

    Well scale is a two dimensional property, meaning the first number is X scale and then Y scale. When you type random(100, 120) you are only specifying the X scale so after effects is telling you it needs a number for Y scale too. You might want to try one of hese expressions:

    val = random(100, 120);
    [val, val]

    //or

    [random(100, 120), random(100,120)]

    for this kind of basic expression stuff you can usually find the answer on Dan Ebberts’ site http://www.motionscript.com

    ~Colin

  • Colin Braley

    November 9, 2005 at 11:02 pm in reply to: expression problem

    Well scale is a two dimensional property, meaning the first number is X scale and then Y scale. When you type random(100, 120) you are only specifying the X scale so after effects is telling you it needs a number for Y scale too. You might want to try one of hese expressions:

    val = random(100, 120);
    [val, val]

    //or

    [random(100, 120), random(100,120)]

    for this kind of basic expression stuff you can usually find the answer on Dan Ebberts’ site http://www.motionscript.com

    ~Colin

  • Colin Braley

    November 7, 2005 at 11:35 pm in reply to: transfer mode expressions?

    You can’t keyframe (or add expressions to) a layers transfer mode. You can just split the layer and change the transfer mode at a specific point in time. If it is required that you set many keyframes of a layer’s blending mode I recommend checking out the Channel > Calculations effect.

    ~Colin

  • Colin Braley

    November 7, 2005 at 11:35 pm in reply to: transfer mode expressions?

    You can’t keyframe (or add expressions to) a layers transfer mode. You can just split the layer and change the transfer mode at a specific point in time. If it is required that you set many keyframes of a layer’s blending mode I recommend checking out the Channel > Calculations effect.

    ~Colin

  • Colin Braley

    November 5, 2005 at 4:50 am in reply to: Running counter, starting higher than 30,000

    I forgot to include the part that would round off the decimals when I originally posted. Try this:

    beginNum = 50000000;//Beginning number of counter
    endNum = 10;//Ending number of counter
    duration = 3;//duration of count down in seconds
    Math.round( linear(time, 0, duration, beginNum, endNum) )

    all I did to round the number was used the statement Math.round(). To round a number to the nearest whole number use this, to make a number go up to the next whole number use Math.ceiling() and to simply drop the decimals (make it go down to the lower number) use Math.floor(). These prove invaluable when working with numbers. As for making the 10 line up in the proper place you need to set the anchor point of the text to a different spot. Refer to the manual or online help within AE to learn more about this if you don’t know what it is. Well that’s it, glad I could help.

    ~Colin

  • Colin Braley

    November 5, 2005 at 4:50 am in reply to: Running counter, starting higher than 30,000

    I forgot to include the part that would round off the decimals when I originally posted. Try this:

    beginNum = 50000000;//Beginning number of counter
    endNum = 10;//Ending number of counter
    duration = 3;//duration of count down in seconds
    Math.round( linear(time, 0, duration, beginNum, endNum) )

    all I did to round the number was used the statement Math.round(). To round a number to the nearest whole number use this, to make a number go up to the next whole number use Math.ceiling() and to simply drop the decimals (make it go down to the lower number) use Math.floor(). These prove invaluable when working with numbers. As for making the 10 line up in the proper place you need to set the anchor point of the text to a different spot. Refer to the manual or online help within AE to learn more about this if you don’t know what it is. Well that’s it, glad I could help.

    ~Colin

  • Colin Braley

    November 4, 2005 at 3:13 am in reply to: Running counter, starting higher than 30,000

    Try this:
    -Twirl down the properties for your text layer. (you should see the text and transform properties)
    -Twirl down the “text” property
    -You should see an animatable value called sourcetext.
    -Alt + click on the stopwatch and paste in my expression
    -(instead of alt + clicking you can hightlight the property and go to animate > add expression if you want)
    -That should be all you need to do

    ~Colin

  • Colin Braley

    November 4, 2005 at 3:13 am in reply to: Running counter, starting higher than 30,000

    Try this:
    -Twirl down the properties for your text layer. (you should see the text and transform properties)
    -Twirl down the “text” property
    -You should see an animatable value called sourcetext.
    -Alt + click on the stopwatch and paste in my expression
    -(instead of alt + clicking you can hightlight the property and go to animate > add expression if you want)
    -That should be all you need to do

    ~Colin

  • Colin Braley

    November 3, 2005 at 1:09 am in reply to: Running counter, starting higher than 30,000

    I am not in front of my AE right now but you could try this:
    – Create a new text layer
    -add the following expression to sourcetext:

    //–Begin expression

    beginNum = 50000000;//Beginning number of counter
    endNum = 10;//Ending number of counter
    duration = 3;//duration of count down in seconds
    linear(time, 0, duration, beginNum, endNum)

    //–End expression

    ~Colin

Page 37 of 46

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