Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Animation Show in Pecent

  • Animation Show in Pecent

    Posted by Jim Zito on April 15, 2010 at 6:16 pm

    Hello,

    Tough one here:

    I have an animation of 3 bars scaling horizontally. They represent 3 candidates for which people can vote. I would like to have it so as they scale from 0 – 100, a percent is shown on screen that corresponds to the animated scale percent. The 3 percents then have to add up to 100%. So as each bar scales from 1 to 100, the percent number shown on screen would have to be somewhere between 0% and 33 1/3 %.

    Thanks,
    Jim

    Jim Zito replied 16 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 15, 2010 at 7:37 pm

    It shouldn’t be too tough, but somewhere you have to generate the data for the total number of votes and the number that each candidate gets (sliders maybe), and each expression needs to be able to get at the data. Then your text expression can look like this (substitute links to the sliders for my numbers):

    totalVotes = 45;
    myVotes = 15;
    (100*myVotes/totalVotes).toFixed(2) + “%”

    And your horizontal scale expression would look like this:

    totalVotes = 45;
    myVotes = 15;
    s = 100*myVotes/totalVotes;
    [s,value[1]]

    Something like that.

    Dan

  • Jim Zito

    April 16, 2010 at 2:20 pm

    Thanks so much Dan!

    Jim

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