Actionscript 3 :: Get Item Value From An ArrayCollection?

Jul 18, 2011

I trying to read a value from an ArrayCollection, I use getItemAt and get an object:

masterData.getItemAt(0,0)

Then i use: masterData.getItemAt(0,0).toString(); and get:

<d>
<i>The value that I need</i>
</d>

Now How can I get the value in "< i >" tag?

View 2 Replies


Similar Posts:


Flex - Item's Depth In ArrayCollection?

Mar 21, 2010

is it somehow possible to get item's depth in ArrayCollection?

View 3 Replies

ActionScript 3.0 :: Move An Item Within An ArrayCollection?

Oct 18, 2010

Is there any way to move an item from one position in an ArrayCollection to another without removing and then adding it? There's no setItemIndex function in ArrayCollection, but there is a CollectionEventKind.MOVE that can be dispatched in a CollectionEvent. Does anyone know how to get ArrayCollection or any of it's cousins to dispatch that event?

I'm using the item as a dataprovider to a listy thing that implements effects, and I want the list to reuse the same ItemRenderer instead of creating a new one.

View 0 Replies

Actionscript 3 :: Change The Value Of An Item In A Flex ArrayCollection?

Nov 27, 2009

I have an ArrayCollection with values predefined. I want to assign a new value to items in the arrayCollection but can not figure out how. Basically I want to do something like this:acGuages.itemUpdated(0).thevalue = 90; (Changing the value from 25 to 90)

private var arrayGuages:Array=[
{thevalue:"25",height:"115"},
{thevalue:"45",height:"115"},

[code].....

View 1 Replies

Flex :: Edit ArrayCollection Through Item Renderer?

Jun 16, 2011

I use a spark List with a custom item renderer and an ArrayCollection for dataProvider.

The ItemRenderer looks something like

<mx:TextInput id="txtValue1" text="{data.myFirstValue}"/>
<mx:TextInput id="txtValue2" text="{data.mySecondValue}"/>

However, even though I change the text in txtValue1 or txtValue2, those are not actually changed in the object inside the ArrayCollection.

myFirstValue and mySecondValue are decorated with the [Bindable] tag.

My understanding is that if the text property is set to be bound a certain property, the changes should be automatically applied.

So the HACK (or so I think) that I use is to listen to the focusOut event of each textbox, and access the parent data provider and set the the values manually.

View 1 Replies

Flex :: Find An ArrayCollection Item With A Specific Property Value?

Oct 14, 2009

I have some XML structures like this:

var struct:XML = <mh>
<mi id="1" stuff="whatever"/>

[Code]....

I wonder if items can be accessed in a similar way, like this:

var stuff:Object = cmenu['id == 2'].stuff;

View 8 Replies

Flex :: Sorting - ArrayCollection Bubble Item Up Or Down By One Position?

Mar 22, 2010

I have an ArrayCollection where I want to be able to bubble items up or down by one position. What is the best way to do this?

View 2 Replies

Flex :: Display ArrayCollection In Group With An Item Render?

Jul 27, 2011

i got an Arraycollection which holds other arrays in it.i want to display the data inside with an item render but cant manage to do this
here is example code to explain my question

<s:DataGroup dataProvider="{news}"
itemRenderer="components.displaynews">

and this is the item render

<s:Label text="{data.??/}"/>

now what i dont understand is what comes after data? in the array collection the data goes like this : myArrayCollection->[0]->firstname

so when im binding data to item render,how do i represent the [x] to get to the specific name that i want? this obviusly wont work

<s:Label text="{data.[0].name/}"/>

and one more thing is what is the lightest way to display data in a listgroup with simple item render (image and text)

private function convertFBEventData2TreeData(eventData:Object):Object
{
var children:ArrayCollection = new ArrayCollection();[code].....

i dont know what to add after data, i tried many things but nothing work :

View 1 Replies

Android :: Retrieve Objects Item Information From ArrayCollection?

Aug 26, 2011

I am currently using the latest verion of Adobe Flash Builder to create a Mobile Application. For the application one feature is to allow the users to bookmark content an this is done by storing the id of the object to be Bookmarked into an SQLite db on the device. This part has been done successfully and they are stored fine.

Now what I want to do is to pull back the bookmarked id's from the database and pass them to a WebService call which needs to be made to an External Database. When I retrieve the Bookmark id's from the local database they are contained within object, I now need to find a way to take the id's from the database objects in the ArrayCollection and store them in a new array that will be passed to the WebService, as the webservice is expecting an Array of Int's and not Objects. Below is the code I created to see if the object items are within the array list of objects:

private function loop():void
{
var index:int;

[Code]....

View 1 Replies

Flex :: Reverse Order Of ArrayCollection So That The Last Item Appears First In A ComboBox

Jan 26, 2011

Is there a way to reverse the order of the items in a comboBox? I'd like to use index numbers to refer to items in the arrayCollection below. I want the newest content to appear first in the comboBox. But, if I add something above the first item then all of the index numbers will be off by one. If I could add a new item to the end of the arrayCollection, but have it appear first in the comboBox drop down that would solve a lot of problems.

[Code]...

View 1 Replies

ActionScript 3.0 :: Access Array In Arraycollection And Add Item To The End Of Array?

Aug 24, 2010

I have this code to try to acess the values of the array in the arraycollection but it does not work it actually creates a value to the end of the arraycollection. can anyone tell me what im doing wrong i basically whant to modifys the individual arrays in the arraycollection and add Login_user.

Code:
for(var i:int = 0; i< dispArray.length; ++i){
dispArray.addItemAt({"login_user":"XXX"},i);
}

View 1 Replies

Flex :: Mxml - Components Bound To Empty ArrayCollection At Load Time Don't Render As Expected When The ArrayCollection Is Updated?

Oct 27, 2009

I'm new to Flex and am using TileList bound to an ArrayCollection. The array collection is empty at load time, and then updates with the results from am HTTPService call. The problem is that the item renderers aren't being rendered as expected, I'm guessing because there was no data when they were first rendered at load time. Here's simplified example:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script>

[code].....

View 2 Replies

Actionscript 3 :: ArrayCollection Index Got Changed After Filter The Arraycollection?

Oct 7, 2011

I have a advanced datagrid and populating some data by using arraycollection. And i am filtering the arraycollection, the arraycollection index got changed.

Arraycollection:- [0] - name: abc
[1] - name: hello
[2] - name: hello1
[3] - name:hai

after filtering the arraycollection as 'hell' , the array collection is displaying like the below:

Arraycollection:-
[0] - name: hello1
[1] - name: hello

Can i know the reason why the index got changed after filter it?

* no server side code for filtering. it is only flex side filtering.

View 2 Replies

Flex :: Select Item In Details Form Dropdown When Datagrid Item Is Selected

Feb 15, 2011

I have this datagrid:

<mx:DataGrid id="dgCompetenteN" includeIn="Test" left="10" right="472" top="69" bottom="149"
dataProvider="{colCompetente}" editable="false">
<mx:columns>

[Code]....

What I want to do is, when I select an item in the datagrid, the selected item of the dropdown should be the correct one (the one which has the field idCompSuperioara equal to the third element in the selected datagrid row).

View 1 Replies

Flex :: Get List Item Selection Working When Using A Png Mask In An Item Renderer In A 4.5 Mobile App?

Jun 10, 2011

I'm creating a mobile app in which I need to show a calendar with months at the top. The months are part of a component that extends from SkinnableDataContainer (and has some custom scrolling/behaviour - which is why I did'nt use a spark list). I need the months to be shown as a 'trapezium' shaped tab and so I'm using a png image as a mask in the item renderer for the component.

When the mask is not applied, it all works well - the months render, the list/data container selection works when I click on a month and so on.When the mask is applied, it renders well, scrolling and everything else seems to work well - but when I click on a month, nothing happens visually. And from the trace statements in my code, it appears list item selection is not changing. Looks like mouse clicks are not working.

Code:

public class TopCalendarMonthRenderer extends LabelItemRenderer {
[Embed(source="/assets/trapezium_alpha.png")]
private static var TrapeziumMask:Class;
private static var trapeziumMaskInstance:BitmapAsset;

[code]...

View 1 Replies

ActionScript 2.0 :: Display Item In Datagrid In Order It Was Chosen And Remove Selected Item

Jul 20, 2010

I am in search of finding a way to display shopping cart items in a flash 8 datagrid in the order it was chosen by the user & also to ability to delete an item if the user choses. Currently I have the items displaying however they are displaying in a position as it is stored and called in the array. [code]

View 5 Replies

Drop Down Menu Bug - Invisible Bottun Around Each Item Interferes With The Item Besid It

Jul 22, 2011

I have made a drop down menu with 7 items but as the invisible bottun around each item interferes with the item besid it, when i try to roll the mouse from one item to another, the invisible bottum dont work and the dropdown remains open.

View 1 Replies

Flex :: Access TileList Item Index In A Custom Item Renderer?

Mar 4, 2011

<mx:itemRenderer>
<mx:Component>
<mx:Canvas>

[code]......

View 2 Replies

Flex :: Toggling States - When Other Item Is Selected The First Item Does Not Change Its State?

Apr 26, 2011

I have used states in my application.The thing is I have made the first item in my list to be selected. so I gave like this,

if(itemIndex == 0)
this.currentState="selected";

this works fine.The problem is when other item is selected the first item does not change its state,it remains in the selected state until its clicked.My code looks like this,

<s:BorderContainer id="outerCont" width="275" height="100" borderVisible="false"
backgroundColor.normal="#3D3C3C" backgroundAlpha.selected="0.1"
backgroundColor.selected="{data.color}">

My states are like this,

<s:states>
<s:State name="normal" />
<s:State name="hovered" />[code]........

View 1 Replies

Actionscript 3 :: Trigger Flex Piechart Item Click Event When A Datagrid Item Is Clicked?

Nov 4, 2011

Is it possible to trigger Flex Piechart Item click event when a Datagrid Item is clicked.If so can anyone give some example.

View 3 Replies

ActionScript 2.0 :: Select An Item From List Component And Fire A Function Directly Related To Selecting That Item

Jul 13, 2009

I want to be able to select an item from my list component and fire a function directly related to selecting that item. list is called "tidlist" function is "selecttid(n)" the "n" needs to be replaced with the index number... so if run my swf and the list component displays my items... when i select one (the third one for example)... i want to fire "selectTid(3)".... cant seem to grasp.

View 1 Replies

Actionscript 2.0 :: Select An Item From List Component And Fire A Function Directly Related To Selecting That Item?

Jul 13, 2009

I want to be able to select an item from my list component and fire a function directly related to selecting that item.

list is called "tidlist"
function is "selecttid(n)"

the "n" needs to be replaced with the index number... so if run my swf and the list component displays my items... when i select an item (the third one for example)... i want to fire "selectTid(3)".... cant seem to grasp.

View 1 Replies

ActionScript 2.0 :: Get A Character To Pick Up An Item And Throw The Same Item?

Oct 30, 2005

Im doing my platform game and I want to know in ActionScript how to get a character to pick up an item and throw the same item.

how do I do that? whats the code?

View 1 Replies

Show Item Index In My Item Renderer?

Mar 10, 2011

How to show the item index in my item renderer.Owner of the item renderer is TileList. [url],..

View 2 Replies

ActionScript 3.0 :: Record The Current Position Of Any Of The Items Item In Order To Use That Data To Change The Position Of The Item After The User Clicks?

Jan 2, 2010

If I have several items that move across the screen but the user can click any of them at any time, how do I record the current position of any of the items item in order to use that data to change the position of the item after the user clicks?

This is what I am doing: I have 11 images that slide accross the screen. The user can click any of them at any time. When he clicks one I am scaling the image so it looks like it is comming forward (z axis) and then the rest of the images are scaled down so it looks like they are going back on z axis. So what I am trying to do is get the current position of the image when the user clicks the image so that I can use that to correctly estimate the scaling and moving of the image to make it look like it scales from the center and not from the top left corner. So if have a variable that gets the current position of the image being clicked I'm thinking I can change its position using something like: x = currentposition + -45;

View 9 Replies

Actionscript :: Get A Menu Item's Width Before Displaying The Menu Item In Flex?

Mar 11, 2011

I'm trying to get the menu width of a menu item in flex 4. I can get it but I have to show the menu first, then hide the menu, do a calculation, and show it again. Is there an easier way to get the item menu width without this hassle?

View 1 Replies

ActionScript 3.0 :: Stop The Preloader To LOAD An Item When I Click In Another Item To Load?

Oct 27, 2009

how do I stop the preloader to LOAD an item when I click in another item to load.. Is that possible? Here in my example the preloader runs perfect, but when I start another mouseevent CLICK the old loading still active (on BANDWIDTH PROFILER, but the Preloader Movie Clip is removed).. How Do I stop the event when another different loading starts?Not visual aspect but functional.

View 1 Replies

Use Arraycollection In Web Service?

Sep 14, 2011

I am passing array collection from flex to web service, and now that array collection want to use in asp.net web service.

suppose i have passed one array collection, and based on that array collection i want fetch value from database and want to generate report and returning path to flex.

View 2 Replies

ActionScript 3.0 :: Loop Through My ArrayCollection

Oct 17, 2011

I'm using FlashBuilder 4 and trying to create a dropdownlist that populates a datagrid. The functionality is fine but my data is being chopped up too much. Currently every since "nepName" tag in my XML file is showing up in my dropdownlist (which makes for many duplicates of the same names) and only shows the data associated with that nepName tag. I want each nepName (by name ex. Barnegat Bay National Estuary Program) to display only once in my dropdownlist and populate my datadgrid with ALL the data in the XML file that is associated with that name.

View 2 Replies

Flex :: Convert ArrayCollection To XML?

Jul 24, 2009

In Flex, it's easy to convert the XML to Object and to ArrayCollection by using var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(); decoder.decodeXML( xml );

But is there a good way to convert ArrayCollection to XML.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved