Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-18-2004, 02:07 PM   #1
Senior Member
Join Date: Oct 2004
Posts: 117
Default How do I get feedback from an ASP script?

I have a simple form to mail script that is invoked when a button is pressed in my Flash movie.

I want to have the script report back to the Flash file and say whether it has executed properly or not.

Whatever I try, it doesn't seem to work!
I've tried using the sendAndLoad and other bits of code, but nothing seems to work. : (

Can anyone give me a sample scripts where you get feedback?

I know it must be only a few lines... but I just can't figure it out.

I need both the Flash code AND the ASP code (i'm not sure HOW to communicate back from the ASp to Flash).


OM2 is offline   Reply With Quote
Old 11-18-2004, 04:01 PM   #2
hangalot's Avatar
Join Date: Feb 2002
Location: on the road
Posts: 2,858

u use response.write to communicate back.
oi poloi
hangalot is offline   Reply With Quote
Old 11-18-2004, 04:14 PM   #3
Registered User
Join Date: Nov 2004
Posts: 3
Default You need to keep checking from the flash file

you can loop in flash to check to see if a file on the server has changed. eg: say your asp page has finished doing whatever:

if you're not familiar with the fso object then use this sub to save text files to the server:

private sub writeTextFile(strContent, strFilePath)
set fso = createObject("Scripting.FileSystemObject")
set f = fso.openTextFile(server.mapPath(strFilePath), 2, true)
f.write strContent
set f = nothing
set fso = nothing
end sub
So do whatever you want to do with your asp and then save a file to the server
for i = 0 to 100
response.write "this is the " & i & "th time I've done this..." & "<br />"
if i = 100 then
writeTextFile "done=true", "myfilePath.txt"
end if

then on an onenterframe loop in flash keep checking whether the myFilePath.txt file has a variable called done that == true using loadVariables (google it if you don't know how: it's easy...)

That way your asp can report back.
jrda is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 06:21 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.