Welcome, Guest. Please login or register.
Did you miss your activation email?
05/23/12, 02:07
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  PHP, Perl, ASP, JSP, CFM (Moderators: Flash-db, Musicman, vesa kortelainen, Ronald Wernecke, Jorge Solis, nothingGrinder)
| | |-+  reponse from asp in to flash
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: reponse from asp in to flash  (Read 2379 times)
jem7
Server what's that
*
Posts: 1



View Profile Email
« on: 01/28/02, 21:43 »

hi,

I'm work with asp codes to login process in flash movie. i send data to asp codes, using "load variables function". (its working). But i want to get response from asp codes for  movie's  next action. i'm trying this code but its not workin:

response.write "_root.login.msg= incorrect password" (login is MC, and msg is dynamic text)

and

response.redirect "_root.gotoAndStop ("main")" (i want to play 'main' label, if login information is correct.

pls help thanks..
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #1 on: 01/28/02, 22:17 »

Easy one first,

You can not dynamically put actionscript (like what your trying to do with the gotoAndStop("main"); part) into a flash movie from ASP - or any other script for that matter.  

What you can do is return something like this:  response.write "goTo=Main"

This is just a variable/value combo.  Then in your Flash movie have something like this waiting/looping for that response:

if (goTo ne "") {
_root.gotoAndStop(goTo);
}
else {
continue to Loop past frame until response
}

That a very basic way to do it, should be the easiest - you can definitly get more fancy then that though.  What this does is test's to see whether goTo has a value - if it does it will gotoAndStop at the target frame name you specified - In this case 'Main'
Logged

-Jeff.
iCk
Server what's that
*
Posts: 1



View Profile Email
« Reply #2 on: 01/30/02, 14:37 »

Remember, if you want to send a variable back to flash all spaces must be replaced with '+'.

ie response.write ("msg=Invalid+Login") will return "Invalid Login" to the msg var in flash.

That aside, I too was incredibly frustrated when trying to return an ASP response to flash for the first time and here is what I learned:

Testing your movie through the Test Movie menu option in the Flash menu will NOT return an asp variable.  Problem here is that the Test Movie option opens the flash .swf as a FILE (C:\MyDocuments\somefile.swf), not as a web file.  For an ASP page to process, the file must be accessed through the web server in an HTTP'd response.  To test your variable responses from ASP, open the flash file in your browser.

Can't tell you how frustrating I found this!  Hope it helps!

iCk
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!