The input text… I have copied new one on my last post which contains
traffic = myLVs.traffic;
You will have to specifically specify it like that to all of the text fields… (Use instance name rather than the variable name in FMX…) Just copy that part of the code into the retrieve button and you won’t have any more problem… Alrighty??? Good luck…
the first three radio buttons show up.
radioGroup1.setValue(myLVs.rG1);
radioGroup2.setValue(myLVs.rG2);
radioGroup3.setValue(myLVs.rG3);
because of this command…
would i have to place IF statements for each radiobutton? or something like that in some way
i tried it actually with an If , else If and put it in the text file
and the value dot was not showing up for each Yes or NO just on one.
and if i use instaces names, can i pass these values later on to ASP database? cause i know i usually use variables,
to store them in a database. I used the text file just to make sure i can retrieve the values…
Here you go… This is the whole script that goes with the Retrieve button…
on (release)
{
myLVs = new LoadVars();
myLVs.load("test.txt");
myLVs.onLoad = function(success)
{
if (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);
}
};
}
However, you might want to find a way to disable the Retrieve button when the file doesn’t exist… I think that is more logical… Just my 2 cents… :cowboy:
and if i use instaces names, can i pass these values later on to ASP database? cause i know i usually use variables,
to store them in a database. I used the text file just to make sure i can retrieve the values…
Hehe… Didn’t read till the end of your question… :beam:
Yes… You should be able to…
For example,
traffic = myLVs.traffic;
will be
traffic.text = myLVs.traffic;
when traffic is the instance name, not the variable name… When you refer to the data for that input field, you just put [color=blue].text[/color] after then instance name and you won’t be having problem… =)
You think if i do an if statement for the
radio buttons it might. control the movement if nothing is present
that it might select something?
What do you mean??? What movement??? I don’t get it…
but for the checkboxes and radio buttons
i dont have to add anything after it do i
Nope… Those components do not have that property… Look up the Flash manual for more information on the methods you can use…
I’ll have ASP scan the directory and send me the list of the files in the directory back to Flash in the beginning of the movie…
I’d check if the specified file, test.txt, exists or not… and set a vairable, _global.textFileExist, to true or false according to it…
And in your button, it will be something like…
on (Press)
{
if (_global.textFileExist)
{
// the regular code goes here...
}
else
{
// Say that the file doesn't exist...
}
}
Better yet, I’d just disable the ‘Retrieve’ button if the file doesn’t exist… How’s that???
on (Press)
{
if (_global.textFileExist)
{
// the regular code goes here…
}
else
{
// Say that the file doesn’t exist…
}
}
where u have this… if (_global.textFileExist)
how do i convert it for a ASP page.?
the only reason i need the retrieve button to work is, that i will be retrieving data occasionallly that is inputted.
i wish i could just remove the whole retrieve button it would be so much easier for me to do then all this stuff.
someone had told me that i could of done an " if " with the radio buttons to appear but i dont see how that is possible unless ur doing loadvariablesNum i think.
what i will be doing at the end
connecting to an asp page that has teh infromation stored on a access database.
where u have this… if (_global.textFileExist)
how do i convert it for a ASP page.?
That if statement goes into the ‘Retrieve’ button and that cannot be converted to ASP script… I don’t know ASP, but in PHP you can scan the files in the directory, so you gotta find that sort of function in ASP… Know what I mean???
For the new document… I don’t know… There could be million reasons why it is not working… My first bet is the pathing problem??? Do what you can do… and if it really doesn’t work, you can upload the file so that I can take a look…
Second question… Is this what you are asking???
You have a dynamic text field on the main timeline with its instance name set to ‘varTextBox1’, and you want to set the text of that text field from some other variable???
ahahha man i am so tired,
lol i did the stupidest thing ever lol:hangover:
that is what i feel like,
i had my Text file on my desktop and my fla was in another directory and went i did publish it remaind in that directory and coudlnt located the text file lol
remind me never to use Flash again.
i am honestly starting to look like this.:hair:
from pulling all my hair out lol
[AS]on (release)
{
myLVs = new LoadVars();
myLVs.load(“lrm.asp”);
myLVs.onLoad = function(success)
{
// more if routines that will set up
// the check boxes and radio buttons
// comes right here…
other.text = myLVs.other
details.text = myLVs.details
sponsor.text = myLVs.sponsor
raising.text = myLVs.raising
annual.text = myLVs.annual
traffic.text = myLVs.traffic;
store.text = myLVs.store
comments.text = myLVs.comments
varTextBox1.text = myLVs.varTextBox1
varTextBox2.text = myLVs.varTextBox2
varTextBox3.text = myLVs.varTextBox3
varTextBox4.text = myLVs.varTextBox4
if (myLVs.restaurant1 == "Mccafe")
{
restaurant1.setValue(true);
}
if (myLVs.restaurant2 == "24 Hrs")
{
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);
}
radioGroupp.setValue(myLVs.rGpp);
radioGroup.setValue(myLVs.rGp);
radioGroup1.setValue(myLVs.rG1);
radioGroup2.setValue(myLVs.rG2);
radioGroup3.setValue(myLVs.rG3);
radioGroup4.setValue(myLVs.rG4);
};
}[/AS]
that above is what u helped me on the Retrieve information ifu had forgotten
but now for my submit because i took the variable names out.
well i got the Text to work
but THE BIG BIG thing the radio buttons and check boxes wont.
I did this, i used an example that u have from MUG,
on this forum, but
i can’t get nothing to show up.and i dont know how to follow it maybe if u can show me an example with my stuff i can follow it better? please
i coped his radio button values etc
and nothing take a look below.
HaveYouBeen.setChangeHandler(“HaveYouBeen1”);
function HaveYouBeen1(component) {
_level0.HaveYouBeenTo = component.getValue();
}
}
[/AS]
i renamed one set of my radioGroup to HaveYouBeen
like u had in his quote example
but it woudnt work
this is streesing me out!!!
the store shows up!
but the check box? how do i do that )(restaraunt1 and so on)
and my radio buttuons?
pretty pleasee help me