|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
Problem Solved
I found the problem. Thanks for all the help.
|
|
#3
|
|||
|
|||
|
Would you please let me know how to solve this? Thanks a lot!
Quote:
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 |
|
#4
|
|||
|
|||
|
Can someone please answer to exwan's question?
I have a same problem. Help~ |
|
#5
|
|||
|
|||
|
Hello.
Can you tell me how you solved this problem. Im facing similar situation. regards, sajith Quote:
|
|
#6
|
|||
|
|||
|
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:
|
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Flash Development > ASP and Flash: Response.Write Problem? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|