urlloader

Access HTTP response headers in for flash.net.URLLoader object?

Is there a way to access the response headers from an HTTP result when using Flash/Flex's URLLoader? Setting the request headers is possible, as is accessing the response code, but getting a hold of the actual response headers seems to be conspicuously lacking... Specifically, I would like to get a hold of the Last-Modified response he...

How to access AS3 URLLoader return data on IOErrorEvent

I'm writing an actionscript library for an api. I use a URLLoader object to load data from the api. The problem I'm having is that whenever the api returns an http status in the 400s, actionscript treats this as an io error. This is all find and good, however, it seems like there is no way to access any data that was returned if this ...

Why is my URLLoader not dispatching when it completes?

I'm using a URLLoader to send a few key/value pairs to a php script, which then turns them into an e-mail, sends it (or not), and then echoes a string with a response. At first it works fine. The URLLoader posts, and I get my e-mail a minute later, but for some reason I'm not getting my response back. In fact, my COMPLETE event doesn't ...

How can I prompt a user to open or save a PDF file returned by a .aspx file?

I have a Flex application that calls a .aspx page on our webserver, which builds a PDF or Excel File. Right now, I am using navigateToURL() to call the file, and this works fine when the output file is built successfully. However, if there is an error, or timeout, there is no way of knowing this in the Flash movie. I am trying to use U...

Unexpected Flash Security Exception When Using URLLoader

Hello, What I am trying to accomplish is to upload some binary data, specifically a ByteArray representing a PNG image, to a server using the URLLoader class in conjunction with URLRequest. When I set the contentType property of the URLRequest to 'multipart/form-data' instead of the default, the call to urlLoader.load() results in a se...

Image Upload progress using URLLoader AS3

I am developing image uploader in Flash. I use FileReference.browse to browse image then resize this image to 1000 x 1000 px, if the image is very big and then upload to server. I want to show progressbar for the image upload progress. I am usinng URLLoader to send binary data of the resized images, but ProgressEvent on URLLoader doesn'...

How do I fix this cross-domain ActionScript 3 error?

I'm going to be as specific and verbose as possible and include some of the code I'm using. I already did a search and found this question, which seems similar; however the author there was using ActionScript 2 instead of 3, and I couldn't seem to apply any of the answers given to my own situation effectively. I am trying to emulate (in...

Flash URLLoader and Location -redirection

I have a Flash object that sends an URL request with URLLoader. However, how do I make it follow those Location: redirections in headers? ...

Flash vs. Flex: Why not skip Flex and use AS3's URLLoader + server code entirely?

I'm familiar with most of the Flash vs. Flex comparisons out there and most of them present some version of "Flex is better for RIA's while Flash is better for design work". Yet isn't it entirely possible to write elaborate RIA's using the URLLoader class + server side code? In this regard, I'm unclear as to what Flex offers aside from...

Loading and Returning Text Data with ActionScript 3 (URLLoader)

I'm trying to do something exceedingly simple: write a function that reads text from a text file and returns the text in a string using AS3. The Function public function readData(path:String):String { var dataSet:String; var urlRequest:URLRequest = new URLRequest(path); var urlLoader:URLLoader = new URLLoader(); urlLoader...

How to make URLLoader return an AsyncToken?

Hi all, I was trying to retrieve binary data over HTTP for my Flex application, and was running into some stumbling blocks. HTTPService did not seem to deal with binary data well, people said to use URLLoader. But URLLoader does not have the nice AsyncToken/IResponder interface that HTTPService provides. So, I did some searching and ...

Should I set up a socket connection on my computer?

I want to learn everything about XML sockets and server-side stuff, but right now I'm just trying to get my stuff to work. Should I set up a socket connection on my computer? I'm trying to use Flash with an old arcade game. The instructions on Adobe livedocs seems easy. I don't know if I'm approaching this correctly. I need a XML socket...

Flash AS3 - Load XML from outside web directory on the local server

Is it possible for flash to access data from outside of the root directory of the server it resides. i.e. Root directory = /var/www/httpdocs SWF = /var/www/httpdocs/flash/file.swf XML = /var/www/xml/file.xml Thanks! ...

(as3) URLloader keeping connection alive

I have a little problem with a simple URLLoader, it simply just loads the data from an url, and processes that data, nothing complicated. But, when ever i run it, it leaves the connection open. At the bottom of the browser it says: Transfering Data From www.... The data is read sucessfully, so it should close the connection? but do...

Actionscript 3: Memory Leak in Server Polling Presentation App

I'm building a remote presentation tool in AS3. In a nutshell, one user (the presenter) has access to a "table of contents" HTML page with links for each slide in the presentation, and an arbitrary number of viewers can watch the presentation on another page, which in turn is in the form of a SWF that polls the server every second to en...

URLLoader cancel load on any browser event

Hello, I have a flash element in a page that load a chart based on some complex queries that can take up to a minute to load. I call the query with this code : var chartData:URLLoader = new URLLoader(); chartData.addEventListener(Event.COMPLETE, onLoaded); chartData.addEventListener("httpStatus", onHttpStatus); chartData.load(new URLRe...

Combining URLRequest, URLLoader and Complete Event Listener In Actionscript 3.0?

when handling data, i always have to write the following: var dataSourceRequest:URLRequest = new URLRequest("/path/file.xml"); var dataSourceLoader:URLLoader = new URLLoader(dataSourceRequest); dataSourceLoader.addEventListener(Event.COMPLETE, handleDataSource); while i can understand the usefulness of these 2 objects and event listen...

I am trying to parse a text file I loaded in Actionscript 3.0, help please

All I can find information on for the URLLoader object in Actionsript 3.0 involves loading XML files, which I don't want to do. I'm trying to load in a .txt file that I want to parse, line by line with each line being delimited by a comma. Anyone know a method of doing this or a place where I can find some information on how to do this...

Flex 3 Close UrlLoader throws exception

I am trying to simulate a 'HEAD' method using UrlLoader; essentially, I just want to check for the presence of a file without downloading the entire thing. I figured I would just use HttpStatusEvent, but the following code throws an exception (one that I can't wrap in a try/catch block) when you run in debug mode. <mx:Application xmlns:...

multiple URLLoader

I am loading multiple xml files with URLLoader. for (var i=0;i<xmlCount;i++) { loadXML(xmlFiles[i], i); } public function loadXML(req:String=null, _id:Number=0):void { var loader:URLLoader = new URLLoader(); loader.addEventListener(ProgressEvent.PROGRESS, function a(e:ProgressEvent) {XMLLoadProgress(e, _id)...