PDA

View Full Version : Asp


ornj
10-04-2003, 10:08 PM
so far no one has been able to give me an answer to this question and its getting to the point where I just might have to offer a cash prize to the person who can accually give me an answer.

I am trying to call a variable from ASP or a text file. I have been trying to get this to work with a text file so I can just do this locally. I used to be able to do this in MX but now in MX2004 when I try to pass the variable into a text box the text box just reads: undefined.

Can someone PLEASE show me how to call an outside variable into flash and then use it. Please do not link me to a turorial written for a previous version of flash. Once the method I was using in flash mx failed I tried to modify those tutorials and they do not work.

catbert303
10-04-2003, 10:20 PM
Hi,


myLoadVars = new LoadVars();
myLoadVars.onLoad = function(success) {
if (success) {
instanceNameOfTextField.text = this.variableName;
}
};
myLoadVars.load("http://www.yoursite.com/yourfile.asp");


make sure the ASP file outputs something like

&variableName=some value&anotherVariable=whatever&

etc..

circa1977
10-04-2003, 11:34 PM
And on the ASP side (if you're having any trouble with that), you'll need to pass your variable using a response.write. You can limit the output of your ASP page to just what you need.

I use the same method to build and output XML to the Flash that calls the ASP's URL.

dim strSomeValue
strSomeValue = "value_to_pass"

response.write "&myVar=" & strSomeValue
response.end

ornj
10-04-2003, 11:47 PM
All I have to really worry about is the flash at this point. See I'm the design guy. All I have to worry about is the flash and the static graphics. We have a programmer who is like f-ing god. He seems to be able to do anything. So the ASP side of it shouldn't be an issue. It was just the integration. Thank's so much.