I'm trying to visualize the results of a quiz in ActionScript 3.0.
What I would like some input on is how to best link the "filters" (top right corner in attached image) to the data source in a flexible OOP way.
The result array now contains both number of correct answers and meta data about the person taking the quiz. The meta data could be both discrete (sex) or continuous (age).
results = [{name: "Lisa", correct: 5, sex: 0, age: 52}, {name: "Peter", correct: 3, sex: 1, age: 32} ... ]
How do I tell the boxes to, for example, change color when I change filter? Should each box object hold its own data or should there be some sort of controller listening to the filter object to dispatch an event and thereafter call a box.setColor method? What are my options?