flash actionscript:
Hey,
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
Tom
stop();
System.useCodepage = true;
send_btn.onRelease = function() {
my_vars = new LoadVars();
my_vars.fnamn = fnamn_box.text
my_vars.enamn = enamn_box.text;
my_vars.tele = tele_box.text;
my_vars.mobil = mobil_box.text;
my_vars.sender = email_box.text;
my_vars.message = message_box.text;
if (my_vars.sender != "" and my_vars.fnamn != "" and my_vars.enamn != "" and
my_vars.tele != "" and my_vars.mobil != "" and my_vars.message != "") {
my_vars.sendAndLoad("mailer.php", my_vars, "POST");
gotoAndStop(2);
} else {
error_clip.gotoAndPlay(2);
}
my_vars.onLoad = function() {
gotoAndStop(3);
};
};
email_box.onSetFocus = fnamn_box.onSetFocus = enamn_box.onSetFocus =
tele_box.onSetFocus = mobil_box.onSetFocus = message_box.onSetFocus=function ()
{
if (error_clip._currentframe != 1) {
error_clip.gotoAndPlay(6);
}
};