2 Replies Latest reply on Apr 23, 2011 6:02 AM by freemefast

    Dropdown lists and scoring

    freemefast

      Hi,
      I am making a quiz using drop down list behaviours.
      On one frame / page there are several drop down lists. I want a score of  +1 to be calculated based on whether or not the user has made the right  selection in the dropdown list.

      So far I have populated my lists and attached the drop down behaviours.
      I have used send sprite to store the selected contents of that drop down list in another field; 

      on mouseUp me
      put sendAllSprites (#DropList_Selection, "instructionList1").text into member ("tempField1")
      end mouseUp 

      I then try to inceremnt the score by 1 if that field contains the correct string;

      on mouseup me
      if field "tempField1" contains "MOVE" then
      incGlobalScore
      end if
      end 

      My global score script is as follows;

      on startMovie
      setGlobalScore

      end

      global gGlobalScore

      on setGlobalScore
      gGlobalScore =0
      end

      on getGlobalScore
      put gGlobalScore
      put gGlobalScore into field "Score"
      end

      on incGlobalScore
      gGlobalScore=gGlobalScore+1
      end


      The problem is the score just does'nt display in my score field  or it  displays the wrong value, when I use the getGlobal Score field.

      Can anybody please help me as I have tried but cannot get it to work??

      Regards,
      FMF