Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Pass variables from shockwave to .asp page ?

Thread Tools
 
Search this Thread
 
Old Jan 18, 2002 | 01:30 AM
  #1  
DazV's Avatar
DazV
Thread Starter
Scooby Regular
 
Joined: Jun 2000
Posts: 3,783
Likes: 0
Post

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]
Reply
Old Jan 18, 2002 | 09:28 AM
  #2  
Fosters's Avatar
Fosters
Scooby Regular
 
Joined: Jul 2000
Posts: 2,145
Likes: 0
From: Islington
Post

http://www.site.com/page.asp?variable1=value1&variable2=value2&...

in the asp page

<%
parm1=request.querystring("variable1")
parm2=request.querystring("variable2")

%>
Reply
Old Jan 18, 2002 | 09:29 AM
  #3  
Fosters's Avatar
Fosters
Scooby Regular
 
Joined: Jul 2000
Posts: 2,145
Likes: 0
From: Islington
Post

a good online resource?

scoobynet of course
Reply
Old Jan 18, 2002 | 09:30 AM
  #4  
Fosters's Avatar
Fosters
Scooby Regular
 
Joined: Jul 2000
Posts: 2,145
Likes: 0
From: Islington
Post

www.15seconds.com is a good asp resource.
Reply
Old Jan 18, 2002 | 01:56 PM
  #5  
legacyPete's Avatar
legacyPete
Scooby Regular
 
Joined: Dec 2001
Posts: 202
Likes: 0
Post

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
Reply
Old Jan 18, 2002 | 04:10 PM
  #6  
DazV's Avatar
DazV
Thread Starter
Scooby Regular
 
Joined: Jun 2000
Posts: 3,783
Likes: 0
Post

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
Reply
Old Jan 18, 2002 | 04:14 PM
  #7  
DazV's Avatar
DazV
Thread Starter
Scooby Regular
 
Joined: Jun 2000
Posts: 3,783
Likes: 0
Post

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]
Reply

Trending Topics

Old Jan 18, 2002 | 05:14 PM
  #8  
legacyPete's Avatar
legacyPete
Scooby Regular
 
Joined: Dec 2001
Posts: 202
Likes: 0
Post

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]
Reply
Old Jan 18, 2002 | 05:50 PM
  #9  
DazV's Avatar
DazV
Thread Starter
Scooby Regular
 
Joined: Jun 2000
Posts: 3,783
Likes: 0
Post

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]
Reply
Old Jan 18, 2002 | 07:10 PM
  #10  
legacyPete's Avatar
legacyPete
Scooby Regular
 
Joined: Dec 2001
Posts: 202
Likes: 0
Post

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??
Reply
Old Jan 18, 2002 | 07:51 PM
  #11  
DazV's Avatar
DazV
Thread Starter
Scooby Regular
 
Joined: Jun 2000
Posts: 3,783
Likes: 0
Post

Macromedia's documentation is pretty crap. No decent demos or examples.
Reply
Old Jan 18, 2002 | 08:38 PM
  #12  
DazV's Avatar
DazV
Thread Starter
Scooby Regular
 
Joined: Jun 2000
Posts: 3,783
Likes: 0
Post

I've only gone and stumbled on the answer - WAHEY!

Thank **** for that, I'm off out for a PINT!

-DV

[Edited by DazV - 1/19/2002 12:06:29 AM]
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Rbon91
ScoobyNet General
49
Nov 21, 2018 03:23 PM
south_scoob
ScoobyNet General
22
Oct 3, 2015 01:05 PM
Davalar
General Technical
19
Sep 30, 2015 08:54 PM
Cdm172
Was it you?
0
Sep 28, 2015 05:41 PM




All times are GMT +1. The time now is 01:06 PM.