With the Actionscript code below I'm sending an array to the server and receiving two responses: the HttpStatus response and a header with several information, like server info, location, etc. Does anyone have an idea how to read these server information? I cannot find any method or class, which would read the header info.
So I want to read http streams using flash tcp sockets. I do not really need the http header at all - all I need is body which contains flv. so how to read http response body into byte array using flash sockets?
I need to make any request to this url and get Http Rewspons header (like this one:HTTP/1.0 200 OKContent-type: video/x-flvCache-Control: no-cacheI do not need reponse body at all. After I get header need to emmidiatly close connection to that url (so stop to obtain data from it)
I tried using both HTTPService and URLRequest/URLLoader. But I can't figure out how to get either the response output or the response headers in case of a server error(like 500).
I'm using URLLoader to POST to a server. The xml response from the server can respond with a 404 or a 403 (forbidden) error. However I am unable to get the response codes.
Here is the code
var urlString:String = "some url"; var urlRequest:URLRequest = new URLRequest(urlString); var loader:URLLoader = new URLLoader();
[Code]....
status is always 0 regardless whether i return 200, 400, 404, 301, 500, etc...
My swf will potentially live on sites with embed codes that do not allow script access to the movie. I need to pull a cookie from response which is typically simple using javascript, but as the swf does not have access to script, javascript is not an option. Can I access cookies or the cookie header in the response? If that is not possible is there any access to the raw response, headers and all?
I'm working on a project built in Flash AS2.One of the things I need to do is load JSON data. In the past, I've had no problem with this - LoadVars works just fine.However, on this project, the JSON service that I'm calling requires the http request to include an ACCEPT header with "application/json".
LoadVars has an addRequestHeader method that allows me to add or change HTTP request headers, but according to the documentation, those headers are only sent with POST actions.Of course, in my case, the JSON service only allows GET requests.I tried using addRequestHeader anyway, but the header is not sent.(Of course, I could rebuild the application using AS3, which allows me to use URLLoader and URLRequest, but the application has WAY to much legacy AS2 code...)
I am using ActionScript 2.0 for my app development. I have checked XML and LoadVars class. These classes by default send/receive data either in XML or name/value pair format. I want to send data in JSON format and receive the response in JSON format. How can I achieve this behavior using AS2.0. I have noticed that AS3.0 has the capabilities to do so. My client platform doesn't support AS3.0.
We've setup a simple email sending bit of code that communicates with a server script. This is working fine but we're not able to capture the HTTP Status that is being returned by the server! We can see from the server and browser that the status '200' is being returned but for some reason the flash swf isn't picking it up. Is this a security issue?
Code: var EmailVariables:URLVariables = new URLVariables(); var request:URLRequest = new URLRequest(); var loader:URLLoader = new URLLoader(); EmailVariables.name = EnterEmail.Name_txt.text; EmailVariables.email = EnterEmail.EmailAddr_txt.text; [Code] .....
We are working on a plugin for the JWPlayer and I noticed that in Chrome specifically, we are running into issues with the 302 redirect urls that we're using. The JWPlayer is not recognizing the redirect which contains url-based flashvars which we need. So here's my question(s):
1) Is there a way using AS3 to get the response headers from a url when NOT using AIR?
2) Is there any known issues with Chrome and 302 redirects that might be enough to trip up Flash?
3) What is the best method to handle a 302 redirect? The current issue is that there is a queue'd process and none of the other steps can continue without the first one and if the first one fails because it didn't get the proper flashvars, then the whole thing fails.
does Flash comply with HTTP Location headers? For example, if Flash makes a POST request to URL>... and it returns Location: URL..., will Flash return the data in in 1.xml upon completing the POST request?
I'm trying to insert a HTTP header into the request that is made when a .SWF requests a .FLV movie via the flvplayback object. Here's my scenario.
We are using Akamai to distribute our flash video so it loads faster. Our current set up involvels 4 primary components:
1. HTML sitting on our corporate webservers. 2. SWF being served by the Akamai servers. 3. FLV file being served by the Akamai servers. 4. flvplayback skin (SWF file) being hosted by the Akamai servers.
When the HTML file loads into the browser, it requests the SWF, which then loads the flvplayback skin and FLV video. This whole process works until you add security to the mix. We have referer security, which means that that Akamai-hosted files won't load unless the requesting domain is one of our corporate domains. The referer is usually passed over in the HTML header, so the HTML file can successfully request and load the SWF from the Akamai servers. However, when the SWF then requests the skin and FLV file, they don't load because the referer header isn't passed over in this request.
How do I insert the referer header into the SWF request for the FLV and flvplayback skin? I'm assuming this needs to be done from within the flvplayback instance in my SWF file, but I don't know how to reference that. I tried the following, but it didn't seem to work:
I have a banner in actionscript 2, that posts to a URL, and gets a response back. The http header from that is then used to figure out if the posting was successful. This works like a charm i IE, but in Firefox and Safari, the Flash player shomehow interprets the HTTP header as a 0, no matter what the browser actually gets. My guess is that it's what's described here [URL]...
I need to read an xml string. This xml is a http response. I mean, it is generated based on a few parameters sent in the url. I am using ActionScript 2.0. I am using the var LoadVars and the method sendAndLoad() like this:
I've tried a million methods for this. And cant get it to do it. Basically I have LoadVars reading a txt file. The HTML renders fine. Is there a way to get it to parse Javascript from the text file?
Ive tried a million methods for this. And cant get it to do it.Basically I have LoadVars reading a txt file. The HTML renders fine. Is there a way toget it to parse Javascript from the text file?
I have a flash movie that I need to read in a value from a PHP script in order to set which frame it starts from, I am using the following code:
[Code]...
The problem is this is not working - it won't get into the load event. If I run the PHP manually I get "&pageID=29". If I debug this locally I get "Who: undefined" in the trace output window. From all the example I have read, I seem to be doing this correctly but it just doesn't seem to be working. Flash: CS5 using Actionscript 2.0
i am trying to put data in to combo box from php page using http service .there are 2 data records in the php page but instead of displaying data it displays [object object] [object object] in the combo box list
here is the mxml code
@namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx";
I am trying to connect my flex app to a CFC I have which calls a method. It's to test a login control, and when i put the correct credentials in, it comes back with the error: "SOAP Response cannot be decoded. Raw response: ".
One of the moderators, could you've a look at this tutorial: [URL] it doesn't works with me, maybe because I've 2004 so if you change loadVars() into LoadVars() it should work