Colin Braley
Forum Replies Created
-
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
-
Colin Braley
October 30, 2005 at 7:18 pm in reply to: Expressions: Leading zeros and decimal places.Glad I could help.
~Colin -
Colin Braley
October 30, 2005 at 7:18 pm in reply to: Expressions: Leading zeros and decimal places.Glad I could help.
~Colin -
Colin Braley
October 30, 2005 at 5:00 pm in reply to: Expressions: Leading zeros and decimal places.Here is a a simple way to round a number to a specified amound of decimal places:
Just pick whip nums to something else and change the value of the numOfPlaces variable to make it round to a different number of decimal places.//–Begin Expression
nums = thisComp.layer(“Deep Lime Green Solid 1”).effect(“Slider Control”)(“Slider”);
numOfPlaces = 3;
//–Do not modify below this linefunction roundTo(number, places)
{
num = Math.round ( Math.pow(number, places) );
num /= Math.pow(10, places);
return num;
}roundTo(nums, numOfPlaces)
//–End expression
~Colin
-
Colin Braley
October 30, 2005 at 5:00 pm in reply to: Expressions: Leading zeros and decimal places.Here is a a simple way to round a number to a specified amound of decimal places:
Just pick whip nums to something else and change the value of the numOfPlaces variable to make it round to a different number of decimal places.//–Begin Expression
nums = thisComp.layer(“Deep Lime Green Solid 1”).effect(“Slider Control”)(“Slider”);
numOfPlaces = 3;
//–Do not modify below this linefunction roundTo(number, places)
{
num = Math.round ( Math.pow(number, places) );
num /= Math.pow(10, places);
return num;
}roundTo(nums, numOfPlaces)
//–End expression
~Colin
-
Colin Braley
October 30, 2005 at 4:49 pm in reply to: Expressions: Leading zeros and decimal places.Here is an expression for source text that should add leading zeroes to a number. Just modify the amtOfZeroes variable and pick whip the nums variable to whatever the source of your number is.
//–Expression begins
nums = thisComp.layer(“Deep Lime Green Solid 1”).effect(“Slider Control”)(“Slider”);
amtOfZeroes = 10;
//–Do not modify below this line
isNeg = false;
if(nums < 0) { nums = Math.abs( nums ); isNeg = true; } sVal = Math.round( nums ) + ""; while(sVal.length < amtOfZeroes) { sVal = "0" + sVal; } if(isNeg) sVal = "-" + sVal; sVal //--Expression ends ~Colin -
Colin Braley
October 30, 2005 at 4:49 pm in reply to: Expressions: Leading zeros and decimal places.Here is an expression for source text that should add leading zeroes to a number. Just modify the amtOfZeroes variable and pick whip the nums variable to whatever the source of your number is.
//–Expression begins
nums = thisComp.layer(“Deep Lime Green Solid 1”).effect(“Slider Control”)(“Slider”);
amtOfZeroes = 10;
//–Do not modify below this line
isNeg = false;
if(nums < 0) { nums = Math.abs( nums ); isNeg = true; } sVal = Math.round( nums ) + ""; while(sVal.length < amtOfZeroes) { sVal = "0" + sVal; } if(isNeg) sVal = "-" + sVal; sVal //--Expression ends ~Colin -
Colin Braley
October 29, 2005 at 5:15 pm in reply to: question about expression on the scale transformTry this:
s = thisComp.layer(“Second Layer”);
[value[0], s.rotation]What this does is basiacly say create a variable named s that is the layer in the comp called second layer. Then set the Y scale of the current layer to the rotation of the layer “Second Layer.” This expression leaves the x component of the scale as is. If you want to learn more about this kind of stuff check out http://www.motionscript.com
~Colin
-
Colin Braley
October 29, 2005 at 5:15 pm in reply to: question about expression on the scale transformTry this:
s = thisComp.layer(“Second Layer”);
[value[0], s.rotation]What this does is basiacly say create a variable named s that is the layer in the comp called second layer. Then set the Y scale of the current layer to the rotation of the layer “Second Layer.” This expression leaves the x component of the scale as is. If you want to learn more about this kind of stuff check out http://www.motionscript.com
~Colin
-
unfortunately, you can’t really time remap something from something else, because expressions can only modify the parameter they are assigned to .
~Colin