Flash Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignFlash Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 19th, 2004, 02:45 PM
Ryan Ryan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 2 Ryan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ASP and Flash: Response.Write Problem?

I am trying to send values to Flash from ASP but it appears as though I can't concatenate a string variable with the explicit strings in the Response.Write, below is my code and output. Any ideas? Thanks.


ASP CODE: (getFlashVars.asp)

Option Explicit
Dim i
Dim thePics

thePics = "image2"

For i = 0 to 23
thePics = thePics & ",image2"
Next

Response.Write("&pics=" & thePics & "&")

FLASH CODE:

var myVar = new LoadVars();
myVar.onLoad = function(LoadStatus)
{
if(LoadStatus)
trace(this.pics);
else
trace("FAILURE");
}
myVar.load("getFlashVars.asp");

OUTPUT FROM FLASH DEBUG:
" <---That's it a quotation mark and a space



From the debugging I have done, it appears as though "&pics=" & is all that is being read and it is using the concatenation operator as the ending &.

If it matters, I am using Flash MX.

Reply With Quote
  #2  
Old February 14th, 2004, 02:25 AM
Ryan Ryan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 2 Ryan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problem Solved

I found the problem. Thanks for all the help.

Reply With Quote
  #3  
Old March 18th, 2005, 04:12 PM
exwan exwan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 1 exwan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 40 m 36 sec
Reputation Power: 0
Would you please let me know how to solve this? Thanks a lot!

Quote:
Originally Posted by Ryan
I found the problem. Thanks for all the help.


Hi Ryan,

I have exactly same problem you had. I spend 2 days and couldn't figure out why. Would you please kindly let me
know how you solve this?
I just want a simple solution to pass a log on user name from asp to flash, but it only load the ".
my asp code is:
<%
charpos = InStr(Request.ServerVariables("Logon_User"), "\")
user = Mid(Request.ServerVariables("Logon_User"), charpos+1)
user = UCase(user)
response.write ("&logname=" & user)
%>

my actionscript code is:
myLoadVars = new LoadVars();
myLoadVars.load("security.asp");
myLoadVars.onLoad = function (success) {
if (success) {
trace(this.logname);
}
else {
trace("Unable to load the Logname.");
}
};

Thanks in advance!

exwan

Reply With Quote
  #4  
Old August 11th, 2005, 04:12 PM
jjkim5 jjkim5 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 1 jjkim5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 4 sec
Reputation Power: 0
Can someone please answer to exwan's question?
I have a same problem.
Help~

Reply With Quote
  #5  
Old September 23rd, 2005, 01:35 AM
sajithjm sajithjm is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 1 sajithjm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 36 sec
Reputation Power: 0
Hello.

Can you tell me how you solved this problem. Im facing similar situation.

regards,
sajith

Quote:
Originally Posted by Ryan
I am trying to send values to Flash from ASP but it appears as though I can't concatenate a string variable with the explicit strings in the Response.Write, below is my code and output. Any ideas? Thanks.


ASP CODE: (getFlashVars.asp)

Option Explicit
Dim i
Dim thePics

thePics = "image2"

For i = 0 to 23
thePics = thePics & ",image2"
Next

Response.Write("&pics=" & thePics & "&")

FLASH CODE:

var myVar = new LoadVars();
myVar.onLoad = function(LoadStatus)
{
if(LoadStatus)
trace(this.pics);
else
trace("FAILURE");
}
myVar.load("getFlashVars.asp");

OUTPUT FROM FLASH DEBUG:
" <---That's it a quotation mark and a space



From the debugging I have done, it appears as though "&pics=" & is all that is being read and it is using the concatenation operator as the ending &.

If it matters, I am using Flash MX.

Reply With Quote
  #6  
Old October 5th, 2006, 01:21 PM
fontalba fontalba is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 1 fontalba User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 31 sec
Reputation Power: 0
ASP page needs on run on server

Just make sure your ASP page is retrieved from server as script needs executing to produce expected response.

var my_lv:LoadVars = new LoadVars();
my_lv.load("http://myserver/myweb/flash/myasp.asp");

(this might be a bit late for users in this thread but it might help someone out there and save them some time to work it out)

Quote:
Originally Posted by sajithjm
Hello.

Can you tell me how you solved this problem. Im facing similar situation.

regards,
sajith

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignFlash Development > ASP and Flash: Response.Write Problem?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT