Xml :: (Flex 3) Get Data From A File Using HTTPservice And Save The Return Data As An Array?
Oct 15, 2009
I have an xml file (externally saved) that is similar to the following:
[root]
[main]
[title]...[/title]
[Code]....
What I like to do is to get what's in [title] tag using HTTPservice, import it into Flex, and save it as array objects, and do the same thing for [content]. This way I can later refer the array object saying title[0] or content[2].
View 1 Replies
Similar Posts:
Dec 21, 2011
I'm getting really annoyed by Flex. Is there a way to make it wait for an httpservice to get its data without having to use a timer?
At the moment my code looks like this:
protected function loginUser(event:MouseEvent):void
{
if(txtEmail.text == "" || txtPassword.text == "")
{
[Code].....
When I do user.login(), it sends a request with a HTTPservice from my external AS class. In the result event handler for this httpservice, I set a public variable to true or false, depending on whether the user's credentials are correctly in the DB.
I then use a getter to get that boolean value. However, without the timer, it always returns false because my code is faster than the event result handler. If that makes sense.
So I have to use a timer to stall my application for one second.. But seriously, that doesn't make sense to me. There has to be a better way, no?
View 3 Replies
Dec 28, 2009
I have to populate an Advanced Data Grid which have the following fields: Continent->State->Society-->Actual Value-->Estimate Value I want to simulate a financial market so i have to change some of the values by asynchronous request from an HTTPService; If necessary i'll post the .as file, but it is generated automatically by Flex Builder.
Here's the code of the client side Flex/Air application:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
[Code].....
View 2 Replies
Jan 10, 2012
I've got a Gridcolumn in a Datagrid (Spark). The Column's dataprovider is a Number value that gets updated via Binding.Now, without an item renderer the cell displays the correct values.If I set an item renderer, I can't access the values in this renderer.My renderer looks like this, so nothing really do here (for now) but to trace the value, but the value is always NaN.
<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%" >[code].......
without the renderer, the column displays the correct values, so apparently the DefaultGridItemRenderer works fine.As requested, here is my Datagrid;
<s:DataGrid id="dataGrid" dataProvider="{_listItems}">
<s:columns>
<s:ArrayList>[code]..........
_listItems is an ArrayList with instances of a model class, which has (amongst others) a property called change of type Number.
View 1 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
Jul 9, 2011
I want to retrieve data from a Database and display inside a datagrid in a Flex web application. The way I'm thinking of doing it is :
Send the Query data from .mxml file to the .jsp page using HTTPService. In the .jsp, connect to the database and retrieve the data using select statements. send the results back to the .mxml using HTTPService.
I know what to use but I have an ambiguity. In the (.mxml) I use xxx.send() to send the data. What do I use in the (.jsp) to send it back ? I know that I should store the results in an XML in the .jsp file, but how to do that ?
View 1 Replies
Oct 9, 2010
I have an array collection of strings and integers (which I have displayed in a data grid) and I am wondering if it is possible to export the array collection into an html table? or even a text file for the user to download
I found some pages that had an export to .xls files but I want to stray away from that for now.
View 1 Replies
Jun 2, 2010
I'm trying to send some data to PHP using HTTPService POST but for some reason it's not working. The same example works with GET but not with POST:
private function start():void{
var param:Object = {};
param.date = "2010-10-10";
[code]....
But when I change the method in HTTPService to GET and in PHP I get the result as expected - PHP sends back the date:
2010-10-10
View 1 Replies
Oct 13, 2010
I'm using mx.rpc.http.HTTPService to retrieve data from a web service. On the initial call to "loadWsData", HTTPservice accurately retrieves all the data.
However, on any and all subsequent calls HTTPService does not accurately retrieve the data; rather it always retrieves the first data set. I've confirmed that the web service is providing accurate data, both from web browsers and a ruby ws client script.
[Code]...
View 1 Replies
Dec 19, 2011
i have my HTTPService, it looks like this :
<s:HTTPService
id="setCustomerInstalledPackageService"
url="http://localhost:8090/myapp/servletName"
[code]......
View 1 Replies
Dec 22, 2009
I know that httpService in Flex can configure the data as an object, but I want to do the same thing, but with URLLoader. Is that possible and how would I do it?
View 2 Replies
Oct 7, 2010
My data grid is displaying stale data, rather than the real time data available in it's data provider (array collection). I've tried refeshing the data in the collection, but that has no effect. Below is my code, does anyone see what could be the problem?
<mx:Accordion/>
<fx:Script>
<![CDATA[[code].....
View 4 Replies
Dec 12, 2009
send xml data to the server using HttpService request thr POST in Flex?
View 1 Replies
Dec 23, 2009
I want to use an HTTPService to load some data (number of columns and number of rows) which change randomly by a certain frequency I get the string like freq#ncols#nrows#value. How can i display for example: 1000#21#13#2391 that means: in 21 col, 13 row i have the value of 2391 which changes every 1 second.
View 1 Replies
May 19, 2007
I have a question about my xmlReader.as file about XMLReader class.this will be xmlreader class , but i can not take the data.
View 1 Replies
Mar 27, 2009
I have a text file that I'm loading in, and that works just fine, but I want data to be saved to the file and I can't figure out how to.
This is what I have so far:
[code]....
View 4 Replies
Jan 14, 2008
I have an Access Database (doesn't need to be Access, I can phpAdmin or mysql, whatever will work) that has a list of names. I want the user to open a Flash form and have the names load up into seperate input boxes for each name. The user can then change the names, move them, whatever, and then save the record. I want it to just overwrite the record. I donlt want create a new record. I cannot, for the life of me, figure this out. I have tried to find some tutorials but nothing makes sense. Is ASP a good way to go? I have been struggling with this for a week now.
View 3 Replies
Jul 4, 2011
How do I save data from an AIR app to a .db file? I'm learning how to do an AIR app to take the strings from the user inputs textfield and generate a .db file that will be saved in 'My Documents' in the user's computer when the user clicked on the 'Save' button in the AIR app.
View 4 Replies
Sep 23, 2011
I have flat data in my app which I will need to group, summarize, and count as I normally would with a sql query. For this project though, it must be done in the flex app. I need to figure out how to group my data by day or month using a datatime field in my Arraycollection, then appropriately count or summarize data in other fields. I've used Groupingcollections before, but only when binding to hierarchical controls (like AdvancedDataGrid and Tree), but I need a resulting ArrayCollection with the grouped and summarized data. Basically, I'm trying to access my AC like a sql table (GROUP BY MONTH(datetime), COUNT, COUNT(DISTINCT(), etc.) and I'm unsure how to do it.
View 2 Replies
Jul 5, 2011
there are 2 items on stage, one is the "button" with instance name myButton and a dynamic text field.so the action script goes this way...
myVar=0;
myButton.onRelease=function(){
myVar++;
trace("click");
}
the dynamic text is initially zero (0) and when i click the button it counts the clicks up to here every thing works right but...when .swf file previewed in html after clicks if refresh is pressed the number is going back to zero.i want to upload this file and use on webpage.
View 5 Replies
Aug 28, 2010
As part of a project I am working on, I would like to know if it would be possible to store some data in the actual flash file.
Let me make this clear now... I DO NOT WANT TO USE COOKIES!
I need to be able to save some data to the SWF itself, NOT to the local computer.
To be more specific, I need to store a set of URL's, but they also need to be added by the file, so...
Lets say i have a button that when you click, will make a text box appear, and you type in some urls such as:
[URL]
I then have a button that says "Save" and this will save these 3 URL's. I then would have the SAME SWF display these URL's (these will be URLs of Images). The important part is, these 3 URLs MUST BE READ by everyone who views the swf afterwards, so if I were to enter some URLS of Images, when someone else views the page, they will see the images that i entered. This is why it cannot be a cookie, as their computer will not see my cookie.
Even if the data cant be stored in the SWF itself, i will need some way to load this information where ever the swf is viewed.
View 2 Replies
May 27, 2008
I have a big dout running in my mind that can we save a xml file from an swf., that is i have done so many projects from which you can read contents from xml but can we write in to xml that is all is my dout.
View 5 Replies
Jun 18, 2011
I have a table which contains 3 columns, "itemid, xcordinate, ycordinate", in this different records are saved, now i want to have these records on a JSON file, when use click save button, all records present in the table(2d array) save in JSON file.
View 1 Replies
Aug 1, 2009
can an an swf file save data to an xml file while running?
View 4 Replies
Aug 14, 2009
I've made a little game in Flash, and I want it to have an online leaderboard. But after looking into it, it seems it's complicated saving a simple .txt file because of security, and the tutorials I have tried to use, using PHP to do it, have not worked, not even the excercise files. So I was wondering if anyone have either a working tutorial or code to save a simple string in a txt file, or know another way of saving data remotely?
View 13 Replies
Mar 20, 2009
I have a stand alone application that would run without a browser on desktop. I would like to write data to a text or database (MYSQL/PHP). Would it be possible for me to extend this functionality to a AS3 Stand Alone Application which would be strictly running on desktop?
View 1 Replies
Oct 22, 2004
What must be done to allow a user to input information into a flash form, have it permanently saved to a .txt file and then have the data returned to another location within the same flash document?
"First time posting and this site is awesome."
View 1 Replies
Mar 28, 2008
I have a desktop app build in AS2
It kind of functions like a shopping cart / product calculator.
I want to be able to physically save a file with text data (to be reloaded later) in a directory on the computer. the app is running form a projector on windows.
View 4 Replies
Mar 22, 2011
how can i save data from the game(like variables) to a file that is in my folder and read the variables from it when i open the game it will read the data from the file(save/load data to a helper file in the game's folder)is there a way to do it?(even with shared objects,as long as it use a file that is in the game's folder)
View 6 Replies
Oct 22, 2004
What must be done to allow a user to input information into a flash form, have it permanently saved to a .txt file and then have the data returned to another location within the same flash document? "First time posting and this site is awesome."
View 1 Replies