Pass variables from shockwave to .asp page ?
#1
Anyone know how to pass variables from shockwave to an .asp page ?
I think the equivalent in Flash was loadvariables() but I'm new to ShockWave (lingo) and am a little unsure as to what to do...
eg. loadvariables("login.asp?username=" + strUsername) etc...
Basically I need shockwave to pass variables to my .asp page, which would query my database and the results would be passed back to shockwave. The database and .asp parts aren't a problem, just the shockwave parts as I'm new to it as of today.
If anyone can recommend a good online-resource or book I'd be eternally grateful.
-DV
PS: I'm even looking into Multi User Shockwave 3 in case that can simplify things (interfacing to asp seems too many steps). Again I need documentation in the form of website or book. Any recommendations would be helpful.
[Edited by DazV - 1/18/2002 1:32:26 AM]
I think the equivalent in Flash was loadvariables() but I'm new to ShockWave (lingo) and am a little unsure as to what to do...
eg. loadvariables("login.asp?username=" + strUsername) etc...
Basically I need shockwave to pass variables to my .asp page, which would query my database and the results would be passed back to shockwave. The database and .asp parts aren't a problem, just the shockwave parts as I'm new to it as of today.
If anyone can recommend a good online-resource or book I'd be eternally grateful.
-DV
PS: I'm even looking into Multi User Shockwave 3 in case that can simplify things (interfacing to asp seems too many steps). Again I need documentation in the form of website or book. Any recommendations would be helpful.
[Edited by DazV - 1/18/2002 1:32:26 AM]
#2
Scooby Regular
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes
on
0 Posts
http://www.site.com/page.asp?variable1=value1&variable2=value2&...
in the asp page
<%
parm1=request.querystring("variable1")
parm2=request.querystring("variable2")
%>
in the asp page
<%
parm1=request.querystring("variable1")
parm2=request.querystring("variable2")
%>
#5
I've had a bit of a play around with a login thing for PHP (I assume that is what you're trying to do). You can have a look at it here.
Try entering some garbage, you should get a message "Access denied". If you enter user for username and pass for password you should get "Access granted". Its very simple, and although I'm using PHP, the flash movie would be the same for ASP.
Instead of trying to explain it here, I'll email you the files if you want.
Pete
Try entering some garbage, you should get a message "Access denied". If you enter user for username and pass for password you should get "Access granted". Its very simple, and although I'm using PHP, the flash movie would be the same for ASP.
Instead of trying to explain it here, I'll email you the files if you want.
Pete
#6
Firstly, thanks for the responses, but...
Like I said, I understand how to pass variables from html to asp - the login script is written and running in ASP no problem. What I want to know is which command in Shockwave/Lingo gets the variables in and out to the server-side script, in this case ASP.
Will check out those resources.
-DV
Like I said, I understand how to pass variables from html to asp - the login script is written and running in ASP no problem. What I want to know is which command in Shockwave/Lingo gets the variables in and out to the server-side script, in this case ASP.
Will check out those resources.
-DV
#7
Incidentally,
I've been using ASP for the last couple of years, and one resource which I find pretty invauluable is:
http://www.4guysfromrolla.com/
-DV
[Edited by DazV - 1/18/2002 4:17:31 PM]
I've been using ASP for the last couple of years, and one resource which I find pretty invauluable is:
http://www.4guysfromrolla.com/
-DV
[Edited by DazV - 1/18/2002 4:17:31 PM]
Trending Topics
#8
Yeah, I understood what you wanted, that is what my example is doing. It uses the loadVariables command to pass variables to a script and return values.
On my submit button I have the following:
on (release) {
if (txtUser != "" && txtPass != "") {
loadVariables ("login.php", "/dataMovie", "POST");
} else {
getURL ("javascript:alert('Please enter your username and password')");
}
}
dataMovie is where the returned values are passed to. The script just looks for the variables txtUser and txtPass in my login table and returns a result. To get the values back into flash, on your script page you output the variables (and nothing else); in my example it is the following:
msg=Access%20%denied OR
msg=Access%20%granted.
!NOTE!
You must make sure your values have no spaces - thus the %20%. In PHP you use urlencode, must be something similar in ASP.
Flash then has a variable msg set to either of the values. You can then do what you want with it.
You can also use onClipEvent (data) to perform an action when the data has been loaded such as remove a loading message.
Have a look at my example as I think it is what you are after - its flash, not just a login script.
Hope this clears things up.
Pete
[Edited by legacyPete - 1/18/2002 5:16:40 PM]
On my submit button I have the following:
on (release) {
if (txtUser != "" && txtPass != "") {
loadVariables ("login.php", "/dataMovie", "POST");
} else {
getURL ("javascript:alert('Please enter your username and password')");
}
}
dataMovie is where the returned values are passed to. The script just looks for the variables txtUser and txtPass in my login table and returns a result. To get the values back into flash, on your script page you output the variables (and nothing else); in my example it is the following:
msg=Access%20%denied OR
msg=Access%20%granted.
!NOTE!
You must make sure your values have no spaces - thus the %20%. In PHP you use urlencode, must be something similar in ASP.
Flash then has a variable msg set to either of the values. You can then do what you want with it.
You can also use onClipEvent (data) to perform an action when the data has been loaded such as remove a loading message.
Have a look at my example as I think it is what you are after - its flash, not just a login script.
Hope this clears things up.
Pete
[Edited by legacyPete - 1/18/2002 5:16:40 PM]
#9
Pete - isn't that Flash code you've placed there ?
I'm after shockwave (lingo) code. Pretty sure shockwave doesn't support loadvariables() command.
Flash uses "ActionScript" scripting language
Shockwave based on "Lingo" scripting lanaguage
Sorry to be a pain - but documentation is scarce.
-DV
[Edited by DazV - 1/18/2002 5:58:26 PM]
I'm after shockwave (lingo) code. Pretty sure shockwave doesn't support loadvariables() command.
Flash uses "ActionScript" scripting language
Shockwave based on "Lingo" scripting lanaguage
Sorry to be a pain - but documentation is scarce.
-DV
[Edited by DazV - 1/18/2002 5:58:26 PM]
#10
Sorry, I obviously didn't understand what you wanted!
Should have read the whole message instead of just skimming it!
You've probably looked, but possibly try macromedia??
Should have read the whole message instead of just skimming it!
You've probably looked, but possibly try macromedia??
Thread
Thread Starter
Forum
Replies
Last Post