5 Replies Latest reply on Oct 7, 2007 9:17 AM by tom38

    RadioButton Help


      I m having issues with radioButtons , due to the fact that I m unsure how they work!
      I hope someone has the time and energy to help me, appreciate it a lot.

      Oki here is the deal.

      I want to have 3 radioButtons so they become a scale from 1 - 3, meaning there will be a question and they will answer on a scale from 1 - 3.

      So all the radioButtons belong to the same groupName = radioButton.

      Now what I need to do is to make sure that the button that was marked will be posted.
      So if I gave each of the radioButtons and instance name , lets say g1, g2, g3:
      i would need to type in my script the following:

      my_vars.g1 = g1.radioButton ?

      my_vars.g2 = g2.radioButton ?

      my_vars.g3 = g3.radioButton ?

      But how do I know which one the user marked? I only want to send through php, the marked button!

      Should I do an If condition?

      Hopefully someone can guide me through this!

      Best Regards

        • 1. Re: RadioButton Help
          Level 1
          Hi tom,
          Having a similar problem with radio buttons - if your wanting to post the data from the result of your 3 radio buttons to php then as long as the 'answer' appears in a dynamic text box then can't you set the php script to pick up the answer like in a contact form?
          Im not very good at this sort of stuff but I'll try to post a fla and php to show you roughly how I've got around the problem.
          • 3. Re: RadioButton Help
            tom38 Level 1
            Hi again,

            I m not sure you received my message. But I m not able to open your fla. I can download it but it says "unexpected file".
            Regarding the php. I cant even download it hehe, typical .

            THe swf file works though!

            Appreciate the help !

            Best Regard
            • 4. RadioButton Help
              tom38 Level 1
              Oki Guys I managed to solve the problem with the radio buttons on my own.

              To receive a value from your radio button:

              my_vars.radioButton = Group2.getValue(); //Group2 is the group name I use for the radio button. getValue() //returns the value if marked.

              So if you have five radio buttons placed:
              1. make sure you name them all with the same group Name by using the parameters window (window, properities , parameters.
              2. then just type the code getValue() as above and barabim barabum....get down james brown!

              You can of course use trace() to see if you are receiving the value when testing the movie.

              Of course you need to place a radion button from the component section that follows along with flash!

              • 5. Re: RadioButton Help
                tom38 Level 1
                Yep its me once again!

                Stuck on another problem that I cant find on the webb. tabIndex is a way to index the forms in flash. But i dont seem to be able to tab through to my radioButtons :)!

                Any suggestions?

                Best Regards