Flex :: Url - Send Array In URLRequest?
Jun 24, 2011
In efforts to allow users to save their progress in my application, I've decided to allow them to save. In order to do this, I'd like to create an array with all the necessary information, and send that information to a coldfusion (.cfm) file and process the information from that page. Is it possible to send an array instead of a bunch of url variables? It is possible (and quite probable) that users would exceed the query string length of most browsers.
View 1 Replies
Similar Posts:
Jan 14, 2010
Need to find a way to send a delete method from Flash Player (Flex). Currently it's not done by default (except for from AIR), but I am sure someone has augmented the URLRequestHeader to get it to work properly. I've tried this, it isn't working:
[Code]...
View 2 Replies
May 17, 2011
I'm using the weather.com XML service to retrieve forecast data. I created an instance of UrlLoader and passed the entire HTTP address including credentials, location and other parameters to it. This works very well in tandem with the XML(urlLoader.data) functionality in that I get the result for the specified location ID. I then use E4X to trace just the nodes needed.
The tricky part is that I have to do this for 19 additional cities. I've done the initial work in the Main class, Main function, private function onXmlLoaded. I tried creating a new public function getCityName making the new URLRequest, tracing XML and adding values to my components. However, when I attempt this, I receive
Error 5006: An ActionScript file cannot have more than one externally visible definition.
How can I easily setup the URLRequest to request data for all 20 cities, and parse the results thereafter? Do I pass an array of location IDs to URLRequest, because that's the only part of the HTTP request that's different. Do I create separate ActionScript files with their own class and functions for each of the 20 queries?[code]...
View 2 Replies
Jun 1, 2011
I want to add Authorization header to my requests.I added the following line in crossdomain.xml of the server:
<allow-http-request-headers-from domain="*" headers="Authorization"/>
And still, the header is not sent (checked with Wireshark).
EDIT:the code of the urlRequest:
var request:URLRequest = new URLRequest();
request.method = URLRequestMethod.POST;
request.url = this.uploadURL;
request.data = post;
[code]....
View 2 Replies
May 9, 2009
I'm trying to send variables to a payment gateway (dibs) and need to post variables to the likes of[code]...
In creating a dynamic variable I'm doing this, which works. But it's not posting the values to the php-page. (The "normal" variables are being posted just fine, so the error isn't there) [code]...
View 1 Replies
Dec 13, 2006
I have XML object formed and data ready to write to the server by means of server-side script. The code used on the server-side script is testing code available from the ActionScript 3.0 cookbook examples (by Joey Lott). It basically takes the XML object, parses it and writes some of the text node values into a textfile. What i want to achieve send the xml data from AS3.0 to PHP/PERL script, parse these data, write some variables from the xml object into a textfile on the server.
[Code]...
View 1 Replies
Jan 25, 2011
I have an AS3 swf which users can upload jpg images to my EC2 instances which sit behind and Elastic Load Balancer. The jpg images are converted into bytearray data and sent using URLLoader.load(URLRequest)I make 2 calls when uploading, one to upload a large version, then another to upload a thumbnail version. A PHP script to which the bytearray data is uploaded converts this to a file using file_put_contents($destination,$GLOBALS["HTTP_RAW_POST_DATA"])Is it possible to combine these two requests into a single request which contains both the bytearray data for the large and thumbnail images and 'split' the HTTP_RAW_POST_DATA to create 2 files at the server. This would be better than uploading the bytearray for the large version then using something like ImageMagick to resize the resulting image into a thumbnail which I realise is another option.
View 1 Replies
Apr 29, 2011
I have a collection of Objects in an ArrayCollection in my flex page.
What is the best approach to send this data to a Java Servlet?
The object in the ArrayCollection is a VO that consists of an id and message for now. I want a solution that is scalable in case more properties are added later on.
View 1 Replies
Jul 26, 2011
I am using FB for PHP 4.5, ZendAMF, and I read that I do not need to use HTTPService for what I want to do.
Table structure:
people: {pID, pName}
departments: {deptID, deptName}
people_departments: {pID, deptName}
I have a slightly complex flex script, People.mxml. In the PersonAdd state, I have a form which will be used to send data to the mysql server. In that form , I have a repeater that will create a checkbox for every department in my database. When I click the Add button, I want to insert data into the people and people_departments tables.
[Code]...
[Edit] I am using an s:Checkbox and I do not have the data property. mx:Checkbox does but I cannot use the mx:Checkbox component in my project.
View 2 Replies
Mar 24, 2011
I have a video file in my local system.I am using windows XP in my system. Now i want to send this video file byte array to server in Flash Builder (Flex 4). I am using PHP at server end.
View 5 Replies
Jul 28, 2011
I need to send a byte array of data (its an image source) along with a bunch of other vars to a service.If I send the byte array using something like the following
var request:URLRequest = new URLRequest ( 'http://www.mydomain.com/upload.php' );
var loader: URLLoader = new URLLoader();
request.contentType = 'application/octet-stream';
[code].....
View 1 Replies
Jan 19, 2009
What I'm trying to do is taking a XML file that have data that I put into a MovieClip call "field" that reside in my library and into that MC I have numerous text field to put my data into, in that XML file I have a field call <link> that I want to use as a URLRequest but I can't seem to be able to assign it.
Here is a section of my XML file:
<channel>
<shows>
<dates>01.22.2009</dates>
<city>Montreal</city>
[code]....
View 2 Replies
Aug 22, 2011
what if u want to parse a whole html table into flash and turn each colunm into an actionscript 3 array? flash doesnt know how many rows the table has, but i could print the number of rows in the same page as the html table, and make it parse the number of rows from the same page after a urlrequest the first step is to probably make a php page with my database splayed out as a table, maybe with
---- row1col1=dan row1col2=jenson row2col1=jen row2col2=dennings-------
numrows=2 and so on as table entries, and then have flash urlrequest the page i can do that, but i dont know how to parse each column into an actionscript 3 array but it only shows how to parse one value, not a whole array:[URL]
View 3 Replies
Jul 5, 2011
I'm trying to load my XML data into an array. And have this array be randomized, so everytime this swf will be started, another swf will be loaded. (I hope I make myself clear?) I get no error's and I traced the Array, but A it only shows 1 file and B it doesn't load this particular file.Here's my code:
XML:
Code:
<?xml version="1.0" encoding="utf-8"?>
[code]......
View 2 Replies
Aug 12, 2009
In my movie i have a link button with following, simple, function creating a link:
[Code]...
lately i've associated a class file (.as) to my movie and immediately after, when publishing the movie i got the following error message: 1046: Type was not found or was not a compile-time constant: URLRequest. as well as a couple of other related error messages: 1180: Call to a possibly undefined method URLRequest. 1180: Call to a possibly undefined method navigateToURL. when i remove the link to the class file, the problem goes away. also, i have checked the class file for mentioning of "URLRequest" and nothing is there.
View 9 Replies
Dec 27, 2011
During development I have to test using several different hosts. It is a pain to have to change the IP address everywhere I use navigateToURL or in an mx:HTTPService. I would like to set a var with the IP... public var hostIP:String = "192.168.1.100"; Then later I instead of doing...
[Code]....
View 2 Replies
Apr 24, 2010
can I make role based authorization when sending requests to an ASP.NET MVC backend system. I am calling action methods and expecting JSON results, however, some action methods are decorated with the [Authorize] attribute, others require some role privileges to be present. I certainly hope that passing authorization data with every request is possible
View 1 Replies
Feb 16, 2010
I am sending userID through urlRequest like below code,
[Code]...
now when new window is opening in that new swf is opening(new project) that is also in flex only.there i need to retrive userID when initailizing only how can i retrive?
View 2 Replies
Jun 13, 2011
I'm attempting to upload a video via the YouTube api. I can authenticate everything fine and formulate the request just fine but the body of the request with the binary video data I'm having an issue with.
What's the proper way to encode the file data and add it to the body of the urlRequest?
My best guess was:
public function getFileStreamBytes(fileName:String):String{
var byteArray:ByteArray = new ByteArray();
var returnString:String = "";
[Code]....
View 1 Replies
Sep 4, 2011
I'm trying to upload a bytearray, but am struggling to make the content-type go as image/png (it always goes as application/octet-stream no matter what I do.).I've checked the request with Charles Proxy, and can confirm that it indeed always goes as application/octet-stream.My code is:
protected function onObjectLoaded(event:Event):void
{
var byteArray:ByteArray = new ByteArray();
var fileName:String = fileReference.name;
var uploadPath:String = serviceURL;
[code]....
how to change this, so the bytearray itself gets passed in as image/png instead of octet-stream This image is being upload from the client side, and being passed as a FileReference, which I then invoke load(), and then get it's "data" attribute, which is where the bytearray is.
View 1 Replies
Apr 7, 2010
My Flex client app has got some data from the back end (RemoteObjects, BlazeDS, Spring). Client has got all the data it needs, it now needs to put some information in a CSV format and make it available for download.Using Flex 3 for this.
View 2 Replies
Mar 2, 2011
I am embedding a website into my application, and Adobe Air does not recognize the breakline HTML tag in the source code (Firefox and Chrome auto-correct the error). I have attached the source code below. Is there a way to replace the breakline with the correct syntax (no forward slash). I do not control the website, I am merely loading it into my application, so I can't just change it at the source. I am using an mx: html object and htmlLoader to load the url.
Website Source:
<ul>
<li><a href="Rpt_Selection_2.asp?Report=StatusReport/StatusReport.asp">Status Report</a></li>
<li><a href="Rpt_Selection_2.asp?Report=StatusReport/AlarmsAlerts.asp">Alarm History</a></li>
</ul><br/>
<table class="Header" cellspacing="0" cellpadding="0" border="0">
[Code] .....
MXML Component:
<mx:HTML id="htmlControl" width="100%" height="100%"/>
Script to load URL:
htmlControl.htmlLoader.load(new URLRequest("[URL]"));
View 1 Replies
Oct 13, 2011
We have a flex application that connects to a proxy server which handles authentication. If the authentication has timeout out the proxy server returns a json formatted error string. What I would like to do is inspect every URLRequest response and check if there's an error message and display it in the flex client then redirect back to login screen.
So I'm wondering if its possible to create an event listener to all URLRequests in a global fashion. Without having to search through the project and add some method to each URLRequest.
View 3 Replies
Sep 24, 2009
I'm trying to upload to amazon s3 using FileStream and UrlRequest.
But it seems I can only upload 2 files simultaneously.
Is there a reason for this? How can I work around this?
Also would this affect web service calls to a SOAP web service on the same domain?
View 2 Replies
Feb 13, 2012
I used upload functionality by html . using given code it's working fine .
[Code]...
BUT GETTING Bad request error . so anybody know , what did i wrong in code.
View 1 Replies
Aug 15, 2009
I am trying to send an array to php and from there to mail as a message that array. the problem is that in the php script nothing happens. The problem is that I don't know any much php.[code]And nothing is happen in the echo. The script is tested live in a web server that is supporting php and mail.
View 1 Replies
Feb 13, 2009
how I could send an array to PHP?I know I could essentially do a request to my PHP page per item in my array, but I would rather send the array to PHP and then have PHP do the calling to the database.
My array in flash will look like this:
Code:
var data:Array = [
{position:xxx,type:text(or video),title:some title,tcIn:"00:00:00.00",tcOut:"00:00:00.00"},
{position:xxx,type:text(or video),title:some title,tcIn:"00:00:00.00",tcOut:"00:00:00.00"},
{position:xxx,type:text(or video),title:some title,tcIn:"00:00:00.00",tcOut:"00:00:00.00"},
{position:xxx,type:text(or video),title:some title,tcIn:"00:00:00.00",tcOut:"00:00:00.00"},
[code]....
View 1 Replies
Mar 2, 2010
So I'm trying to send an array of values from PHP to Flash, but the problem is any character I could use to separate the values could potentially be in the value itself.
Fine, no problem I thought. I'll just urlencode the variables and allow (for arguments sake) commas to separate the 'encoded' values.
Just after I'd finished laughing about my mighty victory over code adversary as I often do, I attempted to fetch the array from the PHP file and I quickly learned that Flash automatically applies the 'escape' function to the data after it is received. My laughter was replaced by (for theatrical sake) tears!
A way to tell Flash to stop automatically 'escaping' the incoming variables, or
A way to send an array of values without using a character that could be used in the variable (which could be anything... fullstops, commas, dashes. Pretty much anything within reason)
Now, before you mention that I should just make a NVP (Name value pair) for each variable in the array, know that there is quite a lot of data already being loaded, and adding (what I consider is) unnecessary extra NVP syntax (which would double the large amount of data I'm sending) could potentially cause trouble, not to mention a general lack of bandwidth.
Should I bite the bullet and NVP my arrays (ugh!), or maybe use an obscure character as the separator... but I would like a practical approach to this solution... like stopping Flash from automatically escaping the input.[code]...
View 4 Replies
Jan 13, 2008
I am using flash 8 and actionscript 2 I have created an array in flash to send to php using getURL and POST. i.e.
on (release) {
var id:Array = new Array();
id.txt_4 = 'nopanels';
id.txt_2 = 'xheight';
id.txt_3 = 'xwidth';
[code].....
I am trying to make it 'register globals = off' compatible.
View 2 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