PDA

View Full Version : pass asp querystring value to flash


y2chuck
10-09-2003, 02:25 PM
I have a page called test.html.
It contains a link: a href="asptest.asp?var1=blah&var2=blahblah"

I have a 2nd page called asptest.asp. It contains a 2 frame flash movie and also receives the querystring.

strTitle = server.urlencode(request.querystring("title"))
strTrack = server.urlencode(request.querystring("filename"))
response.write("&title=" & strTitle & "&filename=" & strTrack)

output is: &title=title1&filename=track%2Emp3

frame 1 of the asp page: loadVariables("asptest.asp", 0, "GET");
frame 2 just stops and there is a dynamic text box with "title" as the var.

Problem is, the value doesn't get populated into the text box. I've never tried using flash and ASP before, read some tutorials and from what I've read, this should work but it doesn't. The text box is white background wwith blue text so I know it's not a white bg/white text problem! Any help would be great.

y2chuck
10-09-2003, 02:38 PM
many apologies! I found a similar thread. The asp page creates the variable list and I use the <flashvars> parameter to get the values.
Are there any limitations on the length of characters you can use by using <flashvars> parameter? I'd still like to be able to grab session vars or querystring/form parameters from a static html page into a flash movie by using ASP but <flashvars> fixes my immediate need to get it done.

mjewitt
02-12-2004, 02:40 PM
y2chuck,

I have come across a situation where there were limitations in that we had 6 variables (all equal to extremely long urls) which errored out in Flash. I wasn't sure whether it was the limitations in what can be passed via URL querystring or a Flash issue. Generally though this is not a problem.

Mike

mjewitt
02-15-2004, 04:18 PM
ywchuck,

I had a similar issue - passing ASP variables to Flash. Here's the thread with my resolution on there:

http://www.actionscript.org/forums/showthread.php3?s=&threadid=41451&perpage=15&highlight=asp%20querystring&pagenumber=2