0

I am new here just signed up and I did not find information on how to classify this topic on specific section.

I am using adobe flash professional to create a small banner to auto load one of my own URL for analytics. Is this possible? I found one solution on another user's topic which was (AS 3):

var req:URLRequest("http://your_request");
var loader:URLLoader = new URLLoader ();
loader.addEventListener(Event.COMPLETE, onLoadComplete);
loader.load(req);

private function onLoadComplete(ev:Event):void
{
   var result:String = ev.target.data;
}

But this doesn't seem to work. How can I test that the full webpage is loaded 'invisibly' in the background? If "http://your_request" has cookies for example, I can check if the cookies were created, but I do not know if with this method I'll load the cookies to check if this is working at the first place.

  • It's not clear (at least to me) what you are trying to accomplish. Are you wanting to actually display the page? or strip out some content? You know it's loaded if there is a value in the loaders data property and no errors were thrown - which you should listen for those errors too not just the complete event. http://stackoverflow.com/a/23301556/1457439 – BadFeelingAboutThis Jun 03 '15 at 19:14
  • You can also get the status code returned. Eg 200 Ok, 404 not found etc – BadFeelingAboutThis Jun 03 '15 at 19:38
  • Right, I'll try that. Thanks - Actually what I need and also want is to load the HTTP cookies of "http://your_request" to the user who'll load the SWF on the domain of origin. I can't find any solution to this. – troublie Jun 03 '15 at 20:25

1 Answers1

0

There is no way to get http-cookies natively. But you can do this with a js-helper-function and an ExternalInterface.call. See this answer: How do I access cookies within Flash?

Community
  • 1
  • 1
Andre Lehnert
  • 531
  • 4
  • 9