FCheckBox.setValue and FRadioButton.setValue looks like the one you are looking for… You will have to implement lots of if statements depending on how many check boxes and radio buttons you have on the stage…
when I send the values through EMAIL and OR ASP page that i am using it works fine, I get all the values fine,
and everything i selected worked great
but
now what i did
I wrote down some stuff in a text file…
as follows::
&traffic=Hello&checkboxu=DriveThru&rG1=Yes
the world Hello came up cause it was a text
but the checkboxu and the rG1 being, the radio button
wont load up when i try to Retrieve from the Txt file.
i dont get it, i got a few radio buttons and ony five chioces of check box.
That piece of code should be going after you load your data from the text file by using loadVariables(), loadVariablesNum(), or LoadVars()… (Use LoadVars() if you are in FMX…) I mean after you have checked if the data is fully loaded…
well do i make a new layer and name it action script?
cause i have a button called Retrieve
with this…
on (release) {
loadVariablesNum(“test.txt”,0, “GET”)
}
(-:
so where would i put this?
if (_level0.checkboxu == “DriveThru”)
{
checkboxu.setValue(true);
}
do i put it on the retrieve button or do i make a new action script i am a bit clueless right now
Well… Do not use loadVariablesNum(), instead use LoadVars() function and put the rest of the code within the onLoad handler of the LoadVars() object… That’ll make your life whole lot easier…
Well… If I remember correctly, I have used LoadVars() object last time when we were talking about the form…
Anyways… This will be the gist of it…
on (release)
{
myLVs = new LoadVars();
myLVs.load("test.txt");
myLVs.onLoad = function(success)
{
// more if routines that will set up
// the check boxes and radio buttons
// comes right here...
if (myLVs.checkboxu == "DriveThru")
{
checkboxu.setValue(true);
}
}
}
Um… I just splitted the file with WinRAR into 3 files… Get rid of the TXT extensions and unrar the file with WinRAR… I’ve fixed some of those group names for the radio buttons… Check them out… Also, take a look at the format in the text file… I’m off to bed… Let me know how it works for you…
on (release)
{
myLVs = new LoadVars();
myLVs.load("test.txt");
myLVs.onLoad = function(success)
{
// more if routines that will set up
// the check boxes and radio buttons
// comes right here...
traffic = myLVs.traffic;
if (myLVs.restaurant1 == "mccafe")
{
restaurant1.setValue(true);
}
if (myLVs.restaurant2 == "24hrs")
{
restaurant2.setValue(true);
}
if (myLVs.restaurant3 == "Drive Thru")
{
restaurant3.setValue(true);
}
if (myLVs.restaurant4 == "Playland")
{
restaurant4.setValue(true);
}
if (myLVs.restaurant5 == "Large Parking Facility")
{
restaurant5.setValue(true);
}
radioGroup1.setValue(myLVs.rG1);
radioGroup2.setValue(myLVs.rG2);
radioGroup3.setValue(myLVs.rG3);
};
}