4 Replies Latest reply on Jun 18, 2009 10:32 AM by Handycam

    Keeping track of user's choices

    Handycam Level 1

      I have an app with a series of screens with multiple choice questions, presented in spark lists.


      I have events and such in place to record what the user has chosen (selectedIndex is all I need) for each step.


      I have a function wired up in the main app to receive these and increment what I am calling "buckets" for simplicity:


      private function putIntoBucket(bucket:uint):void {
           switch (bucket){
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:

      All is well, it is counting the number of choices. 


      However, the "powers that be" have now requested the ability to go backward (previous step) and make a change.  So now I need to change this to realize if the user has made a different choice and, if so, take one out of one bucket and put it into the proper bucket.


      I am working on a variety of way, but am striving to keep it simple.  Any suggestions appreciated.