How can I retrive Checkbox Values from a Text File..?

Hello,

basically my titles says it
i have values on my form that is in check boxes and radio buttons
my check box is

checkboxu
andmy
radio button is

rG1

how can i retrieve this info back into flash?

i have done loadvariables,

but only the input text shows up

any suggestions??:frowning:

Howdy…

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…

:stunned:

Ok this is what i did

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.

Well… You could try something like this…

// Untested...
if (_level0.checkboxu == "DriveThru")
{
   checkboxu.setValue(true);
}

something like this goes to all of your components…

last question what will this do?
send the value or retrieve?

cause i have it going through fine …

just retrieving it

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…

:hangover:

that is what i feel like dam it lol

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 :frowning:

restless

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… :wink:

when u say

Loadvar ? do u mean

loadvariables(url, target, method ) ??

what would i put for target?

i got no clue lol i can’t even think it’s almost 5am

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);
		}
	}
}

It’s 5am here too and you expect ME to think??? :stuck_out_tongue:

if myLVs something u made up
or is it a varaible in flash mx?

i am so lost

i compied and pasted what u did below

in my retrieve button

on rlease blah alha
and nothing happended

from the test.txt file i had

Well… Post your file then… I got 15 more minutes to be online and then will go to sleep…

hey i uploaded it to here

http://members.rogers.com/lastdon00/help.zip

i am not sure what i am doing work the rest works

Um… Where is your data file???

data file?
meaning the test.txt?

sorry

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…

Added traffic one here…

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);
		
	};
}

The last one…

Good night!!!

all i can say is thank u!

but one last question

all the radio buttons and check boxes load great

but in the test file
i added some more fields like traffic etc
for the input text
but nothing showed up

is there something i have to do to that as well?

thank u though for the help.