PDA

View Full Version : make flash recieve variables from asp script


SuperDanman
12-18-2001, 04:19 AM
Okay, heres my problem. I need to load variables from a text file over the internet, however, this text file changes often during the course of one movie, depending on what the server does. When I load the variables from the text file over the internet, what happens (I'm guessing) is that flash cache's the server's text file so that flash constantly keeps reloading the cached version (which doesn't change). It was suggested I try using a script. Since I just happened to pick up a book about ASP rather than PHP, my scripting language is ASP.

Anyways, my questions is I have a text file in the syntax that flash reads variables (blah=moo&blah2=moooo&....). I can make an asp script read that, except how would I make the ASP script return what it reads from the text file into flash so flash can load those variables? Any ASPers out there?

roele
12-20-2001, 10:17 AM
Flash should not chache your txt file ... never had this problem.
it should work with :
loadVariables("*.txt",0,"POST");

but when you wants to read txt from a asp file you return
variables with :
Response.Write("&var=value");

then you have to call the .asp file from your flash.....
loadVariables("*.asp",0,"POST");

--> some samples about ASP/Flash on my site
--> www.rolandschaer.ch

playfool
12-20-2001, 10:33 AM
also to add multiple vars for a guestbook say
put

Response.Write("&var=value");

in a loop

------------------------------------------------------
i = 1
do until rs.eof
Response.Write("&var=value" + i );
i=i+1
loop



-----------------------------------------------------
the output:
mess1="hi"
mess2="what sup"

etc etc

roele
12-20-2001, 12:20 PM
Sorry when i have to correct you but

------------------------------------------------------
i = 1
do until rs.eof
Response.Write("&var"&i &"=value");
i=i+1
loop



-----------------------------------------------------

playfool
12-20-2001, 12:22 PM
Your quite right sir... :D

like your site by the way.
cheers

Darren

Nisha
12-24-2001, 05:02 PM
I am sorry....But I really didnt see any data base action with your Poll movie and Guestbook movie....I feel all are static. But not anyDB action

Nisha

Jesse
12-25-2001, 07:32 AM
Also, see the loadVariables Interaction With Backend Scripts tutorial.