Skip navigation
Currently Being Moderated

URLLoader breaks with an absolute path

Jun 28, 2012 5:03 PM

Tags: #actionscript3

I call a php program from my Flash AS3 movie. So long as I use a relative path it works fine. If I change it to an absolute path, it breaks. This Flash file is destined to be an app, so I know have to use an absolute path. Any thoughts? Here's my code, below with the relative path shown in red. If I change that to a full path it breaks. Full path is l.php


function processLogin ():void


var phpVars:URLVariables = new URLVariables();

var phpFileRequest:URLRequest = new URLRequest("php/controlpanel.php");


phpFileRequest.method = URLRequestMethod.POST; = phpVars;

var phpLoader:URLLoader = new URLLoader();

phpLoader.dataFormat = URLLoaderDataFormat.VARIABLES;  

phpLoader.addEventListener(Event.COMPLETE, showResult);


phpVars.systemCall = "checkLogin";

phpVars.term     = term.text;



  • Currently Being Moderated
    Jun 29, 2012 3:25 AM   in reply to lingogirl

    Use Charles, or Fiddler to see what's going on when the request is made. If relative works then you're testing that on the server...are you testing the absolute path on the server too? Crossdomain issue?

    Mark as:
  • Currently Being Moderated
    Jun 29, 2012 11:32 AM   in reply to lingogirl

    network only.JPG

    Mark as:
  • Currently Being Moderated
    Jun 29, 2012 11:56 AM   in reply to lingogirl

    Great - glad you got it working. Please mark the thread as answered if you can. Also - lingogirl - interesting name, are you a Director user? I was a Director guy for a long time.

    Mark as:
  • Currently Being Moderated
    Jun 29, 2012 12:27 PM   in reply to lingogirl
    This means you get your resources just to get the same domain or only resources in other domains. I imagine that there as a security measure to build applications that are not stealing resources from other domains.

    And should be based on the logic that if you work only locally, you would not have to use absolute paths but if you do a RIA, you only get information from internet, yes you would have to use absolute paths


    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points