Flash :: Automatically Send File From Flex Over Http?
Nov 13, 2011
I have a database file I need to send to a PHP controller for synchronization. I can access the standard file upload methods in AS3 but they all require user interaction. I need this take place behind the scenes.
View 2 Replies
Similar Posts:
Oct 19, 2010
I've used the Flex HTTPService to connect to a backend blazeDS service without any problems at all. The question I have is, can I also use HTTPService to send a HTTP POST message to a server (with basic authentication)?
Specifically I'd like to be able to interface Flex with Notifo [URL] and to interface with it you just need to send a http POST with authentication and some key:value strings for the message content. (I've done it from java and from the command line with curl and it all seemed pretty easy to set but I'm just not sure how to go about trying this with Flex).
How would this be done via the HTTPService (if at all) ?
Can anyone see how the mxml/as class would look like and what would be in the services-config file and what adapters need to be used etc etc ??
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 16, 2011
In IE and Chrome, if your swf object requests a url (mp3 file for example) it will also pass the HTTP_REFERER in the request. The HTTP_REFERER will be the url of the swf object. This does not happen in Firefox. The HTTP_REQUEST is always empty. Is this some option in the swf code, bug in flash or limitation of the browser?
View 1 Replies
Jun 3, 2011
I've got a small client/server test application where I have a Flex app that makes an HTTP request of a server app. The server app is a script running on my local machine, listening on port 8001. The client is a swf that I am running locally, and uses mx.rpc.http.HTTPService to make the page request.
The HTTPService is being set up as per below:
_HttpService = new HTTPService();
_HttpService.url = "http://localhost:8001";
_HttpService.contentType = "text/xml";
When I make a basic page request, my server app is first receiving a "GET /crossdomain.xml HTTP/1.1" request, which is failing since I don't have a crossdomain.xml file in place. The reason I don't have one in place is because this is all happening on my local machine (for now) and I shouldn't need one (I don't think).
I definitely had this code working before without a crossdomain.xml when I was using Flex 3.x. I thought I had it working with Flex 4 as well. Now I'm using Flex 4.5. Is there an issue here, possibly due to security policy changes?With all of this happening on localhost, why is the Flash player requesting a crossdomain.xml file?
[code]...
View 2 Replies
Jan 15, 2010
I am having a little trouble sending an xml string to an HTTPService an Actionscript3 (see code below). Basically, I am trying to send a georss xml string for conversion into another format. I am getting an ioError and suspect the xml is causing havoc with the services parser. I know this approach is probably not the best, but this is where I am at.
[Code]...
View 1 Replies
Dec 2, 2009
I'm trying to load an xml file from via http into my flash 8 file. Locally it works fine but when on the server it fails. I assume this has to do the flash security sandbox. How do I get around this. I own the servers so is there some sort of fix that I upload to allow the swf to receive the data?
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
Dec 5, 2010
I need to send an array of objects from Flex to a Ruby Web service, but sending them as parameters is not getting through since they seen to come through as Objects instead of readable data.
Sending it as raw XML or JSON didn't work either so the last resort might be to send everything in a HTTP query. However, I'm not sure how to do this since the array contains objects, all of which have 4 or 5 properties, and I don't know what the right format would be.
View 1 Replies
Mar 5, 2012
I upload a file using adobe air HTTPService.Send method by passing byte array of file content read using FileReference. When I write the set of bytes from the server side (php) it writes the details of the byte array (buff) to the file instead of contents of the file like "endian=bigEndian&position=0&bytesAvailable=61127&length=61127&objectEncoding=3" . Below I have included the code that how I read the file and send it to server. Is there anyway that i can directly pass the data in the byte array to send method?
File Read
var buff:ByteArray = new ByteArray();
var localFilePath:String = "/Videos/sample.txt";
var uploadedFile:File = new File(localFilePath);
[Code]....
View 1 Replies
Mar 29, 2010
I have an application that displays the data from 3 xml files (auto generated from SQL table) using httpservices to get them.The first xml file is small and contains around 30 items, the second and thrid contain around 200-300 items each.The first dataset loads quickly and is invoked on creationComplete. The second and third are called from click events and take quite a few seconds to load. A user of the application will take at least 2-3 minutes reading the data from the first dataset so is there a way I can have the httpservice.send for the second and third xml files called automatically, straight after the first file has finished loading to be able to show the first dataset immediateley and get rid of the waiting times between dataset views.
View 2 Replies
Apr 15, 2012
package com.func {
public class Downloader {
import flash.net.FileReference;
[code].....
View 1 Replies
Jun 21, 2010
I have been trying to insert flash file but I keep getting error messages that:
Not Found
The requested URL /annimations/Snow.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I firstly publish flash into both swf and http files. Then, I opened view source of the http file and pasted the code onto the dreamwaever file.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="[URL]" width="700" height="500" id="Snow" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="Snow.swf" />
[Code] .....
In addition, I deleted code that swfobject.registerObject(FlashID) on the http file. The dreamweaver gave an error message that the code swfobject.registerObject(FlashID) can cause error when downloading the flash. Finally all http, swf and flash files were uploaded. But I still got the error message above. In the past, I managed to upload flash using the method above, although I did not get any message regarding swfobject.registerObject(FlashID).
View 2 Replies
May 30, 2010
how can i play wave file using flash .
I m able to play mp3 files using following code
[URL]
View 1 Replies
Feb 9, 2011
I'm trying to build a workaround for embedding my (downloaded) flash videoplayer. (it's the JWplayer...)
At the moment, when somebody wants to embed the videoplayer they have to include the swf with all the added flashvars (url...). That's messy, and it feels a bit risky... people who know what they are doing can also just remove the plugin and other added data, resolving in me not being able to track pageviews etc.[code]...
Turns out that, when I use file_get_contents on a regular test file, info.php, that responds through a $_GET['var'], the above stated code works, but when I use it on the flashplayer, it doesn't...
As in: the flash file does not seem to be accepting (or responding to) the added header variables...
View 1 Replies
Mar 6, 2009
Is it possible to let flash, send an email to your emailadress, when an Error occured, so that you know when Errors occur after you've put your SWF on the internet?
View 3 Replies
Oct 28, 2009
I'm working on a sample i found on this site:
[URL]
it captures the webcam & saves the image then posts it to a page.
but it seems that i couldn't catch the saved image
i'm capturing the response in a aspx page and save the image in a file. here's my asp.net code:
if (Request.Files.Count == 0)
{
Response.Write("ERROR: No files were uploaded");
return;
[Code].....
View 1 Replies
Jul 24, 2011
We have a lot of crossdomain.xml files at my company. Every service that has Flash availability needs one. Keeping them in sync is annoying, so I'd like to be able to have just one crossdomain.xml file hosted somewhere, and then http redirect (302) all the requests to that central location. Is this possible? I can't find documentation anywhere on the web about the rules.
View 1 Replies
Mar 26, 2011
I'm working on a sample i found on this site:t captures the webcam & saves the image then posts it to a page.but it seems that i couldn't catch the saved image, im kinda rusty on'm capturing the response in a aspx page and save the image in a file. here's my asp.net code:
if (Request.Files.Count == 0)
{
Response.Write("ERROR: No files were uploaded");
[code].....
View 2 Replies
Jul 13, 2010
i'm trying to integrate with a plain http service which has both http/https flavors available for consumption. sadly they never thought of a flash client consuming these services and it will take another 6 months to roll a crossdomain xml policy file on their service (there security team has to approve the process, pm team has to include it in their roadmap and blah blah). i've already implemented the flash client which works fine from a flash ide security sandbox. is it possible to get around this crossdomain policy requirement.
my flash file will always be hosted as [URL] and i will be communicating with [URL]. i'm saying [URL] because they do some loadbalancing at the backend and allocate random servers on connection (which is fine from their server side design perspective). I tried putting following two lines in the constructor of my movie clip, but couldn't pass through the security sandbox error:
View 2 Replies
May 29, 2010
I am trying to send the file details one air app to anther air application using tcp.
View 1 Replies
Jul 21, 2010
I need to find a way to detect keystrokes when the flash file is not selected and send that information to an .swf file. The file would be stored locally (not on the internet).
View 3 Replies
Feb 14, 2005
Im pretty new with the flash -> php -> mysql thing .. And I have made a script that sends some variables (that a user inserts in some input forms) with some var names, and then php handles it and insert it into my MySQL database its kinda ugly that a page pops up and opens the php page.So I was wonderin' if there is some way to send the variables to the php file and process them inside the flash file. without openin' some fancy browser window ?
View 3 Replies
Nov 19, 2009
I am creating some application in flex and one of my purposes is to read content of file and display it in flex. There is huge problem, when I have file written in polish (which contains some special characters) because amfphp transfers this contents few seconds, which is to long (reading and sending content of file without any polish character if fast).My php code reads any files fast, so problem is on amfphp side. Is there any solution or I have to go with HTTPService and load contents of file directly from flex?
View 1 Replies
Dec 15, 2009
I've got a simple YouTube API client put together, written in Flex, that uses a plain ol' URLRequest object to handle Google's "ClientLogin" authentication scheme. Everything works perfectly, except for one case: when Google responds with a 403 and a response body indicating that I should prompt the user for additional information (specifically, a CAPTCHA request).
The problem I'm having is that in this case, I need to be able to retrieve the body of the 403 response, as the body contains information Google expects me to use to assemble the CAPTCHA (e.g., an image URL, etc.). It looks like Flash fails to populate the URLLoader's data property when it encounters a 403 (which is where the response body would normally show up), so I can't tell the difference between a "403: Login Failed" and a "403: Login Succeeded, but We Want a CAPTCHA".
As a backup, I figured I'd have a look at as3crypto's TLSSocket code, but I haven't been able to make any of that stuff work with Google (or even one of my own SSL certs, for that matter).
Is it possible to access the body ofa 403 response with Flash (and if so, how)? And if not,Does anyone have personal experience with a suitable workaround?
View 1 Replies
Jul 16, 2009
Im building a reservation form, using actionscript and php. I use sendAndLoad to send variables to php via POST, which returns a different HTTP POST response in case of sucess or not.
Is there anyway to "read" HTTP POST responses with actionscript?
View 4 Replies
Oct 28, 2009
I know i can access multiply selected options of a list by
var selectedAlgos:Array = algosList.selectedItems;
where algosList is the name of my List.
How to i send this array via HTTPService to a phpfile and how can i then access the elements of this array from the php file?
View 1 Replies
Jul 14, 2011
We're developing a Flex-based component that's going to be hosted inside another company's product. Due to the nature of their hosting environment, the Flash movie will run in its own <iframe> tag.The Flex app calls out to our REST services via HTTPS, and authenticates with an HTTP cookie. This works beautifully in Chrome, Firefox, Safari... everything except IE. I compared requests from Chrome and IE using Fiddler, and noticed that they are identical, save for the HTTP Cookies. IE omits several, including the one used for authentication.
View 1 Replies
Nov 18, 2009
Is there a way to use JSFL to import ai file to flash and automatically create all shapes from illustrator as MovieClip? I want all of them to be in movieclip but amount of illustrator layers are too much to handle with manual hand-tick. Is there anyway to do this?
View 5 Replies
Feb 19, 2011
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?
View 1 Replies