Forum Replies Created

Page 2 of 3
  • Obed Ampong

    October 4, 2018 at 3:33 pm in reply to: count from 0 to a number from a csv file

    It has 7 rows and 50 columns. I made it with excel just like the first one

  • Obed Ampong

    October 4, 2018 at 10:54 am in reply to: count from 0 to a number from a csv file

    Hi Dan,
    Please, I changed the CSV file and After Effects says there is an error in line 4. Could you kindly help me out?
    Thanks always.

    Regards,
    Obed

    startCount = 0;

    idx = parseInt(thisComp.name.match(/\d+/),10)-1;
    endCount = footage("COMPANIES.csv").dataValue([idx,4);

    countDur = 3;

    t = time - inPoint;
    var num = Math.round(linear(t,0,countDur,startCount,endCount));

    num = Comma(num);
    [num]

    function Comma(number)
    {
    number = '' + Math.round(number);
    if (number.length > 3)
    {
    var mod = number.length % 3;
    var output = (mod > 0 ? (number.substring(0,mod)) : '');
    for (i=0 ; i < Math.floor(number.length / 3); i++)
    {
    if ((mod == 0) && (i == 0))
    output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
    else
    output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
    }
    return (output);
    }
    else return number;
    }

  • Obed Ampong

    September 21, 2018 at 3:45 am in reply to: count from 0 to a number from a csv file

    It worked, Thanks very much!
    Regards,
    Obed

  • Obed Ampong

    September 20, 2018 at 11:38 am in reply to: count from 0 to a number from a csv file

    Hello Dan,
    Please, I have one issue. I would like the expression to refer to the layer time instead of the comp time so that I can offset the layer to any time and the expression will begin at that time. Could you kindly help me out?
    Thanks in advance.

    Regards,
    Obed

    startCount = 0;

    idx = parseInt(thisComp.name.match(/\d+/),10)-1;
    endCount = footage("cities.csv").dataValue([idx,2]);

    countDur = 2;

    var num = Math.round(linear(time,0,countDur,startCount,endCount))
    num = Comma(num);
    [num]

    function Comma(number)
    {
    number = '' + Math.round(number);
    if (number.length > 3)
    {
    var mod = number.length % 3;
    var output = (mod > 0 ? (number.substring(0,mod)) : '');
    for (i=0 ; i < Math.floor(number.length / 3); i++)
    {
    if ((mod == 0) && (i == 0))
    output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
    else
    output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
    }
    return (output);
    }
    else return number;
    }

  • Obed Ampong

    September 20, 2018 at 3:43 am in reply to: count from 0 to a number from a csv file

    Thanks very much. it worked.
    regards,
    Obed

  • Obed Ampong

    September 19, 2018 at 5:46 pm in reply to: count from 0 to a number from a csv file

    Thanks, Dan for the reply, I am trying to set the value to the data on the csv data. At the same time, I want the value to change automatically when I duplicate the entire comp.

  • Obed Ampong

    August 19, 2018 at 3:50 pm in reply to: Reading internal source text.

    thanks, it worked.

    regards,
    Obed

  • Obed Ampong

    August 19, 2018 at 2:17 pm in reply to: Reading internal source text.

    Hi Dan,
    Please, I have some issues with the expression for comp10, 20, 30, etc
    It reads Data File: Either index or match name must be present, both are missing at path item 0….
    Please, could you help me out?
    Below is my data sample
    comp1,comp2,comp3,comp4,comp5,comp6,comp7,comp8,comp9,comp10,comp11,comp12,comp13,comp14,comp15,comp16,comp17,comp18,comp19,comp20,comp21,comp22,comp23,comp24,comp25,comp26,comp27,comp28,comp29,comp30,comp31,comp32,comp33,comp34,comp35,comp36,comp37,comp38,comp39,comp40,comp41,comp42,comp43,comp44,comp45,comp46,comp47,comp48,comp49,comp50,……
    1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988…….,

    Thanks
    Regards,
    Obed

  • Obed Ampong

    August 16, 2018 at 12:16 pm in reply to: Reading internal source text.

    WOW, It worked!
    Thank you so much!

    Regards,

    Obed

  • Obed Ampong

    August 15, 2018 at 10:10 pm in reply to: Reading internal source text.

    Yea, OK. that will be great. please, could you let me know?

Page 2 of 3

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