I am trying to develop a simple polling station for an event. I believe this should be fairly easy to do in flash, but I'm normally an after effects designer so any pointers would really help!
I've attached a rough mock-up of what I want it to look like. There will be 5 buttons to choose from. When the guests make their selection I need the corresponding bar to grow a certain increment and then display it's value as a % of total votes taken. Would love to be able to attach this to the top of the bar, but I imagine this would be tricky?
If possible I'd also like to have the highest voted column to be 100% opacity down to the lowest being say 25% opacity.
i attached the fla if you want to explore it. i didn't bother to try to 'optimize' it in any way.
you first need some variables to keep track of different numbers - one for the total number of people checked in, then one for each of the total number of each individual country.
then, each time a country button is chosen, the total number of attendees is advanced, the total number from that counry is advanced, and the %s are all calculated based on these updated numbers.
making the graph change is a matter of choice - there are numerous ways to do this - using a mask or not, using tweens or not. i just chose to increment the height of the bar +1 each click. of course there are limits that should be set to do this for real.
the placement of the ' % text ' can be done based on where the top of the bar is. i copped out and hard coded their initial positions. then their positions likewise get incremented by the same value as the bar ( which in my case was 1 )
my example only considered 2 of the countries, and did not consider the changing of their alphas. that can likewise be done by additional math.