FORUMS: list search recent posts

Interactive Polling station

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andy Stokes
Interactive Polling station
on Mar 16, 2011 at 7:55:58 am

Hi All,

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.

Can anyone offer some pointers?

Many Thanks!

Return to posts index

demetri tashie
Re: Interactive Polling station
on Mar 17, 2011 at 3:18:57 pm

hi andy-

i saw your post and thought about it for a while. what it comes down to is that it is really just a matter of doing some math.

i made a test which you can see here:

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.

if you have specific questions about my logic or code, feel free to ask

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved