ActionScript 3.0 :: Submitting HTTP Header In Flvplayback Request?
Apr 21, 2010
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:
myFlvPlayback.URLRequestHeader("Referer", "http://mycorporatedomain.com/requestingpage.html");
View 1 Replies
Similar Posts:
Aug 21, 2009
I get this error when I try to run my application as a standalone SWF. In case the application is run from the Flash IDE, the application works fine.
View 5 Replies
Apr 13, 2011
I'm trying to reproduce a POST request that was captured from WireShark using PHP. This POST request was sent by a Flash (.swf) object, so it's a little bit complicated in configuring the header.It does not print out anything in the end, so there must be something wrong with PHP code that I could not see.Here is what WireShark captured:
POST /engine/ HTTP/1.1
Host: abcdef.com
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0) Gecko/20100101 Firefox/4.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8[code]....
The result is a blank page instead of response from server.
View 1 Replies
Jun 1, 2010
When Flex application make an asynchronus HTTP request, does it add a special header to the request, like some JavaScript framework does? Something that indicates whether this request is an AJAX call/not.I just want my server side code to return different response format, depending on whether the request is made from browser/flex.
View 1 Replies
Nov 18, 2010
It seems impossible to accomplish a GET request that requires HTTP Authentication in ActionScript?
View 1 Replies
Sep 16, 2010
[url]...
How do I add my own request header to the POST requests generated by FileReference.upload()?
View 3 Replies
Oct 29, 2010
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...)
View 1 Replies
Jul 18, 2011
I have a script, either through Greasemonkey or as a Chrome extension, on a page that contains a Flash application. That flash application sends out POST requests e.g. [URL].
Is it possible for the script running on that same page to capture the request header sent by the Flash code? Kind of like Tamper Data, Fiddler and the like do. EDIT: Just a little more info. I don't need to redirect or alter the request coming from the Flash application. I just to be able to read in the header and save that information in a variable in the user script / extension that is running on the same page.
View 3 Replies
Sep 22, 2010
a.swf is loaded in a.html which is hostedI want to know, if user browses[URL]
View 1 Replies
Mar 12, 2010
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?
View 1 Replies
May 11, 2010
We are facing one issue directly connected with our Flash API we've given to a 3rd party flash vendor. To make a long story short, our API basically wraps domain logic on client and creates a single POST request towards the server in JSON format. All will be ok except in combination MacOS + Safari we receive double requests on server (?).
Even more interesting, we are receiving different agent names - one is expected name/decriptor of the browser and system, other is "CFNetwork".
POST /RuntimeDelegate.ashx - 80 Mozilla/5.0+(Macintosh;+U;+Intel+Mac+OS+X+10_4_11;+fr)+AppleWebKit/531.22.7+(KHTML,+like+Gecko)+Version/4.0.5+Safari/531.22.7 200 0 0
POST /RuntimeDelegate.ashx - 80 CFNetwork/129.24 200 0 0
POST /RuntimeDelegate.ashx - 80 Mozilla/5.0+
[Code] .....
View 1 Replies
Jul 22, 2011
Is it possible to make a simple Http Request using as2 and get the redirected result?xample[URL]
View 1 Replies
Jul 8, 2009
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.
[Code]...
View 0 Replies
Sep 29, 2009
In Flex 3 application I use HTTPService class to make requests to the server:
var http:HTTPService = new HTTPService();
http.method = 'POST';
http.url = hostUrl;[code]....
The application has Comet-architecture. So it makes long running requests. While waiting a response for this request, other requests can be made concurrently.The application works in most cases. But sometimes some clients get HTTP request error executing long running request:
faultCode:Server.Error.Request
faultString:'HTTP request error'
faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"].
View 8 Replies
Apr 10, 2011
I have a flash application that I need to debug and I need to filter out a GET request to redirect it to another domain because the file is not available on the domain that it's trying to get it from. I can not edit the source code until Monday and I need to figure out a way to redirect that request to the other domain that has the resource that is missing.
View 1 Replies
Jun 2, 2009
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).
View 1 Replies
Feb 8, 2011
I'm using an HTMLLoader object to create a simple browser in my AIR application. Is there a way to listen for Event.OPEN (or the equivalent) for when a user clicks a link that causes the HTMLLoader to initiate an HTTP request?For capturing the end of a load, Event.COMPLETE is working perfectly. I just can't find a way to capture the beginning of a load!
View 0 Replies
Feb 23, 2012
Building a photo album / upload image page in my website.I have a page that�s giving me trouble� action.php Error when I test in browser: HTTP 400 Bad Request / webpage cannot be found (highlighted below)
<?php
define('PHPWG_ROOT_PATH','./');
include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
// Check Access and exit when user status is not ok
[code]....
View 1 Replies
Dec 2, 2009
I need to send a HTTP request (and get XML response) from Flash that looks similar to following:
http://example.com/somepath?data=1&data=2&data=3
I.e. having several parameters that share same name, but have different values.
Until now I used following code to make HTTP requests:
var resp:XML = new XML();
resp.onLoad = function(success:Boolean) {/*...*/};
resp.ignoreWhite = true;
[Code].....
But in that case I am loosing ability to do POST requests.
View 4 Replies
Feb 18, 2011
I want to upload new photo to picasa using picasa API
My code:
ActionScript Code:
var _loader:URLLoader;
function uploadPhoto():void
{
_loader = new URLLoader();
_loader.addEventListener(Event.COMPLETE,startUpload);
[Code]...
View 0 Replies
Jan 22, 2010
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]...
View 1 Replies
Aug 10, 2009
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.
View 3 Replies
Jan 25, 2011
I am sending the parameters from flex application through HTTP POST request to Python/PSP script. I am able to call PSP script from flex app using HTTP POST request, but i am not able to use/retrieve these parameters in Python/PSP
View 1 Replies
Sep 17, 2009
I'm new to Flex and couldn't figure out yet how to send binary data to the server as the body of a POST request. The HTTPService component doesn't seem to support this. The FileReference doesn't seem to support setting the data via the Flex API.
View 4 Replies
Feb 19, 2010
I am using Flex 3 (ActionScript 3.0). I use the HTTP progressive download to play sound files. I want to secure the sound files, by only serving them when the request comes from my flex app. I chose the simplest solution of adding a HTTP header to each request send from the app. But flash.media.Sound object ignores the headers set in flash.net.URLRequest. Here's an example,
URLRequest sndFile = new URLRequest("http://blah.com/media/load_sound.php");
sndFile.requestHeaders = new Array(new URLRequestHeader("req-orgin", "myflexapp"));
Sound snd = new Sound(sndFile);
snd.play();
The value of req-origin comes as null in load_sound.php. When i inspect the request using Firebug, the request headers to [URL] doesn't contain the header.
View 1 Replies
Jun 13, 2011
I get following error occasionally while running my flex application. I dont know what is wrong as it works intermittently.
Error occured (mx.messaging.messages::ErrorMessage)#0
body = ""
clientId = "DirectHTTPChannel0"
[code].....
View 1 Replies
Feb 24, 2012
I want want to intercept the response for an ajax request made inside a flash object via javascript.
View 3 Replies
Sep 11, 2010
I'm building an image viewer that has violent content (video games), and so it requires users to enter their birthdays. Problem is that because of company policy, I can't expose any of the source images being viewed in the event that someone might use their resources/net tabs (or just sniff the request) and get the direct link to the image. (I know that they could screenshot it, but that's out of anyone's control and not something I'm worried about.)Is there anyway to inherently mask loaded resources (images)? I've been using sockets, which is great, but there's also the problem of actually loading the image binary (after HTTP request headers are removed) as a Bitmap in Flash.
View 4 Replies
Jun 15, 2011
I am trying to access html files protected by basic authentication. Below is the code to do that but I still get the authentication dialog. I checked the fiddler and found that for the first request authorization header is present but for the subsequent requests which is requested to load the .js, css & images the authorization header is not added. This is the reason I am getting the auth dialog.
Is there a way to add authorization header to the subsequent requests as well?
[Code]...
View 1 Replies
Nov 6, 2009
I basically have a form inside of Flash that I need to submit to a server-side processing page, which will then return either json or xml telling if it succeeded or not ( json, xml I suppose ). My version of Flash is CS4 and I'm wondering if there are any libraries or frameworks I can use to accomplish this.
View 2 Replies