PDA

View Full Version : Flash -> ASP... Theres somthing wrong!


z1ppy
05-20-2002, 11:28 AM
Please please PLEASE HELP. I have only been trying to figure this damn thing out for 10 months (and counting).

Right what i want is basically a user amendable site...

1) The text for the site is loaded from text files - simple
2) The user changes the contents of the textfield variable - simple
3) The variable SHOULD be sent to an ASP script which SHOULD write that variable to the text file on the server which the actual website reads in for its textfield.
4) The next time the site is loaded it SHOULD load the updated txt file from the server with the new text.

...the sad thing for me is that this doesnt happen. I am pretty sure the ASP file is correct, Ive tried writing a text file just from an ASP file with a variable originating in that ASP file and that works so Im sure the something must be going wrong with getting the variable from Flash to the ASP file.

Ive included a Zip which has the FLA, ASP and TXT files. I would be soooooooooooooooooooo grateful if someone could help, throw any ideas or anything. Im 9.5 months past breaking point!!

By the way, Ive been putting all files in the same folder on the server.

Theres a theoretical million pounds winging its way to whoever helps me! :D

Jesse
05-20-2002, 02:45 PM
I don't know ASP and your file doesn't appear to be attache dbut I can say that if your file is being written to but the updated adata is not appearing in Flash perhaps you should consider cache killing methods. Search these forums and or the library for "noCache" to see some script swe use to stop browser cache effecting systems such as this.

z1ppy
05-21-2002, 11:29 AM
You're right, I forgot to attach the files, here they are. i dont really know what you mean about the cache but i dont think thats the problem... the variable is just not getting from flash to the ASP script.

Jesse
05-22-2002, 11:57 AM
Have you followed the general rules when debugging such communication?
Use GetURL, targetted at a new window, instead of loadVariables and GET so you can see if the variables are being passed properly. If that works, switch to loadVariables with GET, then with POST if that works.
Also note you should be using loadVariablesNum("file.asp",0) instead of this.loadVariables (in my opinion at least). Good luck.

z1ppy
05-23-2002, 01:53 AM
Thankyou so much, I have finally managed it. It all works apart from one small thing - I know what you mean about the browser caching the file now - thats what its doing, unless the browser reloads it displays the old file. This isnt too serious but It'd be pretty cool if I could fix that. I had a look at noCache threads and found this...

loadVariablesNum("file.asp??noCache=" + random(1000000), 0, "POST");

...is this where I call my ASP file? I tried the exact above and it still loads the cached file.

Anyhow, thanks again for helping me sort the main problem!

:) :) :) :)

Jesse
05-25-2002, 09:01 AM
You have one too many "?"s in your code. Just:
"file.asp?noCache=" + random(100000)

z1ppy
05-29-2002, 11:32 AM
i take it i have to write the variable noCache to the file?

Jesse
05-29-2002, 11:35 AM
No the noCache variable is just for the URL call so it looks unique to the browser.