Flex :: Dynamic Adding Data Into List?
Dec 17, 2009
I have an XML file, I read the data and want to add it to a List and then use the List to be displayed.
Something like this is what I want to do:
List data = new ArrayList();
data.add(item1);
data.add(item2);
How can I do this, also how will I display the List in a table!!
View 2 Replies
Similar Posts:
Aug 17, 2011
I have s:list component in my MXML and a different actionsscript file which does the socket connection to the server.Everytime a user is connecting to the server I'm sending to all clients the updated users in the server by sending strings of ports (port for each user).Now, when the data gets to the client (to the action script file SocketData function), I want it to be added as an item to the s:List in the MXML file.
View 2 Replies
Jul 30, 2010
when I add items nothing appears in the component but when I make a second adding cycle List shows the one I added previously...The code with which I add my elements is this.The studied method is updateStorages(), the rest is to understand how's the process cycle.All the trace you see in the code works with no problem.
ActionScript Code:
public function Scopa() //constructor
{
[...]
[code]...
View 0 Replies
Dec 30, 2011
I'm currently working on the gift cards section of a flash website for Discovery Clothing based out of Illinois. So far I have had success with every function but getting the "Add Another card" feature to work. What I would like to accomplish is displaying the input data from the Flash UI elements in a new Movie Clip to the left and then have them repeat the process to add another card. After which they would hit the 'purchase' button and see two separate items on their PayPal checkout. I was wondering if anyone might know how to do this. You can look at the Gift Cards section for yourself by visiting: [URL] then click on the "Give a Gift" wallet in the center.
View 1 Replies
Mar 31, 2010
I have an embedded image asset (with a scale9 grid), and I'm trying to get the bitmapdata when it's resized, but I can't seem to do this without adding it to the display list.
I try this:
spriteAsset.setActualSize(w,h);
spriteAsset.width = w;
bmd.draw(spriteAsset);
But when I then draw out the bitmapdata with graphics.beginBitmapFill(), I just get the original un-stretched image.
Or do I need to take 9 separate BitmapData images and make 9 separate bitmap fills?
View 2 Replies
Apr 23, 2011
I want to add a SimpleButton to a list item in a list component. I am getting the CellRenderer for the list item I want and using the addChild method to add the simple button. The button appears in the right spot on the list item but it doesn't function like a button. It's like the contents of the buttons first frame is added to the CellRenderer and nothing else.
View 1 Replies
Aug 10, 2011
i have a simple xml like so:
<root Name="Bob" isImployed="true">
<customer Name="Bob" id="12345">was addressed in the shopping mall</customer>
<Job-title>Insurance</Job-title>
<experience>15</experience>
<Question1 question="how much do you make?">35000</Question1>
<Question2 question="do you get a yearly bonus?">5000</Question2>
<Question3 question="would you be interested in our weekly plan?">yes</Question3>
</root>
[Code]...
I would like to go over all the questions (there are more than question1,question2 and question3). some of those contain numbers (salary, bouns) and some don't. I am looking for a way to go over the whole list, querying if the answer is a number or not, and if so - get the number. (and do some calculation with it).
View 2 Replies
Feb 23, 2011
I'm working on a flash cards application and am using an ArrayCollection of Objects to store each cards individual data. When the user click the 'save' button, the text from the two textAreas and the 'title' textinput are stored in the AC as one object with .title, .side1 and .side2 properties that contain the text from the flash card. I have made a List in a separate class I want to have display the title of each card the user has created, but after days of researching and looking around, I still cannot get the display to list the titles.
Part of my NewCard.mxml:
<?xml version="1.0" encoding="utf-8"?>
<fx:Script><![CDATA[
import flash.events.EventDispatcher;
import mx.collections.ArrayCollection;
import spark.effects.SlideViewTransition;
[Code] .....
View 1 Replies
Mar 19, 2011
I have a bit of a problem (since I'm not used to binding with AS3), the thing is that I want to do this kind of data binding:
<mx:Application xmlns:mx="[URL]"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
[Code] .....
But the ComboBoxes are being created dynamically with AS3, everything is working except I cant bind the second ComboBox dataProvider to be the XMLList in the first ComboBox's selectedItem.
View 3 Replies
Aug 5, 2011
I have a list that accepts drops. When an item is dropped (DragEvent.DRAG_DROP) I need to collect the data that is dropped, however I have found nothing in the event thatdo so, event.dragInitiator.selectedItems would work but gives me an error.
View 1 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
Aug 29, 2009
I have a TileList which represents some remote data. I also have a form which allows me to change the data. And the data may be changed by someone else too.
What is the best way to maintain data in the list in an up-to-date state? The simplest option I see is the following:
Select an item in the list Edit it in the form Save it. The form submits the data to the server When the server reports success the list re-fetches it's data The very bad thing about this workflow is that the list loses selection (a tree would also loose the nodes' expanded/collapsed state). I would really love to find out another option which would enable the list to maintain it's selection state.
View 1 Replies
Feb 17, 2010
I would like to know how to delete(clear) the existing list data values before binding new values. I'm using the list for binding data dynamically using http services. When I make a new call to the service, I want the exiting items to be flushed and bind the newly retrieved data to the same list. How can I achieve this?
View 2 Replies
Mar 19, 2010
So I have Html like this [URL] (I want to create some Flash Track reader which will be opensource)
I need to list in my DataGrid Index of all viki pages in form like
+-----------+--------+
|page name |page url|
+-----------+--------+
| name | url |
+-----------+--------+
View 1 Replies
Apr 25, 2011
I need to create a slideshow using data received from another view.I'm calling the slideshow's view like this:
<s:List id = "list" dataProvider = "{actions}"
change = "navigator.pushView (DetailsProduct, list.selectedItem) ">
<s:itemRenderer>
[code].....
View 1 Replies
Jan 1, 2011
I have the following problem in AS3. I have a string like this one: "prop1:val1,prop2:val2,..."; I want to split and parse the string to obtain a dynamic object like this one: {prop1:"val1", prop2:"val2"}.
The simple way to solve it is to cycle through the string values and to do[code]...
Since I know the property names I expect, this works for me, but doesn't seem to be an elegant solution. I'm wondering if there is another way in as3 (similar to the reflection api in java).
View 2 Replies
Oct 6, 2010
I need to detect when a Flex Spark List (spark.components.List) data has changed so that I can programmatically change its scrollbar. I know that List is a an EventDispatcher but it's unclear which event I'd register for.
Edit: My List's dataProvider is an ArrayCollection that elements are added too. So the dataProvider is never replaced. I considered listening to the backing ArrayCollection, but it's possible the List will react to the change after my listener, which alters the scrollbar. Thus my listener's changes will be superseded by that of the List.
View 1 Replies
Dec 25, 2010
I am using flex with java.
I am fetching data from DB and put in object bean by setter and getter . and make list of beans.
this list i want to show in data grid in flex.
View 1 Replies
Mar 10, 2010
I am Using Flex 3 and apache with PHP 5.2. I am searching for simple as possible way to fill my mx:List with data using POST URLRequest.
In Flex builder I am using the next code
public var variables_se:URLVariables = new URLVariables();
public var varSend_se:URLRequest = new URLRequest("DataProvider.php");
public var varLoader_se:URLLoader = new URLLoader;
[Code]...
View 2 Replies
Oct 6, 2010
I have a Spark List (spark.components.List) backed by an ArrayCollection for its dataProvider. The List has a vertical scrollbar when there's too many rows to display. What I want is when a new row is added to the List for it to scroll to the bottom to show that new row.
I've tried calling List's ensureIndexIsVisible from a listener on the ArrayCollection. This doesn't work because the List hasn't yet fully rendered the new row. It will either scroll to the second from the last row, or throw the exception:
[Code]...
View 3 Replies
Aug 1, 2011
This is my XML data in a file named nodesAndStuff.xml.
<?xml version="1.0" encoding="utf-8"?>
<root>
<node label="One" />[code].........
Now I have added my tree just below the list and I have saved counting from 10 to 19 in one.xml, 20 to 29 in two.xml and so on in different XML file. I have no clue how to connect the XML containing counting from 10 to 19 as the single node in tree at the selection of label one in list
View 1 Replies
Sep 14, 2011
When I move page01 to page02, I pass the same data along with it using the following code:navigator.pushView(Page02, data);How do I move to page02 with passing the next row of data (instead of the same data)? In other word, how to increment to the next row of data with pushView?
View 1 Replies
Feb 1, 2011
I'm having a problem adding numbers that are loaded to dynamic text boxes. I'm using AS 2 (Flash 8). The numbers are loaded to the textboxes from a text file using a loadVars command. The text boxes have instance names of TELEMATICS and BOOK - I have a third textbox called (instance name) RESULT - the text file is called TEST1.txt. My problem is that after trying (and trying) several solutions in tutorials I am unable to add the values in TELEMATICs and BOOK to get a (sum) total in RESULT. My code to load the numbers is as follows:
[Code]...
View 3 Replies
Jan 5, 2010
I am adding DisplayObjects to a Canvas using
ContentContainer.addChild(c);
Where ContentContainer is my Canvas object and c is the DisplayObject I have created at run-time. Some of these DisplayObjects also have children of there own which are added at run-time prior to the DisplayObject being added to the Canvas.
I then need to iterate over all the children of ContentContainer but the first time I do this, it says that ContentContainer has no children (i.e., ContentContainer.numChildren = 0). If I do it again tho then it is fine and returns the correct number of children. Is there something I need to call to get ContentContainer to recalculate how many children it has?
View 2 Replies
May 11, 2010
I wish to have a standard row with string items except two items,no 1 there is a date field and I need a date selector for it.no 2 in another cell of the row I want to put a drop down list box containing text "40" and "20" or you can manually edit the cell so that it displays what ever input you decide (other than 40 and 20)
View 1 Replies
Aug 1, 2011
I have a situation where I have a List showing a queue of Upload Objects:
[Code]...
I would like to create three different views of the List: One showing All uploads in the queue Another showing only the Upload items with Upload.type == "Update" and another showing only the items with Upload.type == "Create". Another example of this would be on an email inbox, where we could filter "All, unread, or read". I realise I could just create three different lists, one for each view of the list (maybe I'm just being picky) but I was wondering: Is there is any easy way to conditionally select the items to display from a DataProvider based on a parameter (for example type =="Upload") so I don't have to juggle three separate ArrayCollections about?
View 2 Replies
Jan 4, 2012
how can i change my list component in Flex 4.6 mobile project with that when an item is pressed it would dynamicly resize and show an article description and a button [URL]
View 1 Replies
Aug 28, 2009
I have a TabBar Control with 3 tab, i need to add controls(Button,Label) dynamically in to each tab, I can add the controls to the initial selected tab but when i add to next tab , i am getting Null exception error That is when TabBar property selectedIndex="0" means i can add to 1st tab.but not in 2 and 3rd. when Tabbar property selectedIndex="1" means i can add to 2nd tab.but not in 1 and 3rd.
View 1 Replies
Jun 8, 2010
Creating a dynamic list and associating a picture with each list item. i need the list to be scrollable, and i want the list and it's associated picture to be displayed randomly when the application is re-launched. i.e it doesnt show the same list everytime.
I also what to be able to sort the displayed list items. e.g if the list items is about restaurants, i want users to be able to sort the displayed items by either; district, cusine type and gastro type.
View 0 Replies
Jul 20, 2010
I created a form dynamically by adding each component in action script,now i want to get back the text/data entered in to that each component dynamically?[code]...
View 2 Replies