0 Replies Latest reply on Sep 1, 2013 2:00 PM by JRGT403

    Coding for random answers


      I'm working on my first project with FB, I can't figure out how to code for the answers to user given questions to be generated at random,  ie: "The answer is YES / NO / Maybe"



      This is what I have so far for that part of it.




                                    function displayAnswer()


                                              var object:Object = new Object();

                                              object.a = " Yes"

                                              object.b = " No"

                                              object.c = " Maybe"

                                                        lblAnswer.text="The Answer is"+object.c  //I can generate the ansewr i want with this but how do i randomize between objects "a-c"






      please let me know if I'm going about this all wrong, I'm using FB 4.6 this is an Air build