Loading ASP in Flash MX v6.0

  • Neko_22
  • Born
  • Born
  • Neko_22
  • Posts: 4
  • Loc: England

Post 3+ Months Ago

Hi,
I'm attempting to load some ASP response into flash, but the tutorials I follow appear to be for previous versions of Flash. Can anyone point me in the right direction as to where i'm going wrong:

getname.asp:
Code: [ Select ]
<%@Language="VBScript"%>
<%
response.write("name=test")
%>
  1. <%@Language="VBScript"%>
  2. <%
  3. response.write("name=test")
  4. %>


actionscript function:
Code: [ Select ]
function GetName()
{
 loadVariables("getname.asp", 0);
 trace(name);
};
  1. function GetName()
  2. {
  3.  loadVariables("getname.asp", 0);
  4.  trace(name);
  5. };


I take it i'm doing something stupidly wrong, like Flash doesn't know what this 'name' variable is or something. Any alternatives to loadVariables? I tried that loadURL or something, but to no avail. Any help would be much appriciated! :shock:
  • Neko_22
  • Born
  • Born
  • Neko_22
  • Posts: 4
  • Loc: England

Post 3+ Months Ago

okay, I found a solution:

ASP Code:
Code: [ Select ]
<%@Language="VBScript"%>
<%response.write &name=test%>
  1. <%@Language="VBScript"%>
  2. <%response.write &name=test%>


Flash Code:
Code: [ Select ]
data_asp = new LoadVars();
data_asp.load("getname.asp");
data_asp.onLoad = function(sucess)
{
 if(sucess)
 {
  trace(data_asp.name);
}
};
  1. data_asp = new LoadVars();
  2. data_asp.load("getname.asp");
  3. data_asp.onLoad = function(sucess)
  4. {
  5.  if(sucess)
  6.  {
  7.   trace(data_asp.name);
  8. }
  9. };

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.