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


Similar Posts:


Flex :: Sorting An ArrayCollection?

Oct 21, 2009

Is there any way in Flex where in we can sort an arraycollection based on strings .I have a dataprovider with strings like "Critical" "High" "Medium" "Low" where in I need to sort it in such a way that I need Critical to be displayed on the top and next High , Medium and Low follows.

View 1 Replies

AS :: Flex - Sorting ArrayCollection By Date: YYYY-MM-DD?

Dec 8, 2009

I have an ArrayCollection of Objects. Each Object has the following keys/values:

{date: 2009-12-01, visits=13555, bouceRate=45}
{date: 2009-12-05, visits=46955, bouceRate=45}
{date: 2009-12-06, visits=13685, bouceRate=45}

[code].......

View 3 Replies

Actionscript 3 :: Flex Bubble Chart Bubble Scaling

Mar 22, 2011

I am trying to Scale the bubbles within the bubble chart. The problem is, I have no control over the data coming in, and the radiusField values are usually below 0 ( no negative values ) with a max of maybe 2.

I created an ItemRenderer for the BubbleSeries, and tried adding a scaleX and scaleY value on the createChildren method, but nothing happens.

View 1 Replies

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 :: 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 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 :: 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

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 :: Arraycollection Sorting Based On Array Of Values?

Apr 8, 2011

I have been working on sorting Arraycollection like ascending , descending the numeric list. Total length of my collection will go up to 100. Now I want to preform sort to nested data like this

Data Structure

Name : String
Categories : Array ["A","x or y or z","C"]

Categories array will have maximum 3 items , out of that three items the second item can have 3 different values either X or Y or Z. My result data looks like here

{"Mike" , ["A","x","C"]}
{"Tim" , ["A","y","C"]}
{"Bob" , ["A","x","C"]}[code]....

anyone please explain how to sort this type of data in a way showing all "x" first , "y" next and "z" at the last and vice a versa.

View 2 Replies

Arrays :: Sorting An Arraycollection With A Numeric Value Coming From 2 Different Fields

Aug 10, 2011

I need to sort an arraycollection. the problem is that my array is combined from two diffrent arrays, in one the age field is called "AGE", and in the other the age is called "MYAGE".

Now I need to sort the combined array according to age but I got two fields with diffrent names. I can go through the array and change all "MYAGE" to "AGE" but i was wondering if theres maybe a way to sort the array in its current status?

View 1 Replies

Actionscript 3 :: Flex - Tree Control Drag Drop .item Position?

Dec 9, 2009

just facing a difficulty with tree control drag drop..Suppose i have tree with drag-drop enabled.I want to which node(id) is droped inside which node. 1]if i drag "Cat1" node inside "Cat3",i want to identify ids of siblings of "cat1",and "cat3".2]in general i want to know the ids of current element being moved along withits new parent and new position and save these postions.3] Also "cat4" when moved outside "cat3",i want know its position and its siblings id.

<mx:XML id="treeDP">
<node label="Categories">
<node label="Cat1" id="1" isBranch="true"/>

[code].....

View 2 Replies

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

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.0 :: Custom Sorting Based On Values In Item Render?

Nov 10, 2009

I have a question on coustom sort..I have a datagrid for which one coloum has a itemrenderer. I need to sort a coloum based on the value in the item renderer. In the dataprovider for the datagrid i have a numeric value. Based on the numeric value in dataprovider i have a String associated with that value which is shown in UI. I need to sort based on the statusLabel associated with the numeric value.

[Code]...

View 3 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

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 :: Bubble A MouseEvent By Z-index Instead Of Hierarchy?

Feb 24, 2010

I have two components being absolutely positioned within a container (they are MapSymbols on an ILOG Elixir map, if that helps). Each component is a VBox with an Image and a Label. Images have functionality tied to the Click event; labels do not.

The problem is when 2 items are positioned so that the label of one is above the icon of another in the z-index, so that the label eats any mouseOver and mouseDown events. Bubbling doesn't help since it bubbles from the label to the vbox to the container, never hitting the lower element. I can't set the vbox to mouseChildren="false", since that keeps the image from getting clicked, as well.[code]...

View 2 Replies

Flex :: Possible To Make Animated Bubble Chart?

Jun 20, 2011

I want to draw a animated bubble chart in Flex 3 / Flex 4 like the link belowDoes anyone know if this made using a readymade component or is custom developed

View 3 Replies

Flex :: Make Bubble Size Relative To Chart?

Jan 12, 2011

I'm wondering if there is any way to make the bubble sizes scale or resize when the size of the chart resizes. If the bubbles are set to a specific pixel size, it seems as though the size is set and that's it. So, if your chart is large, the bubble is size X and if the chart is small the bubble is still size X. [code]...

View 1 Replies

Actionscript 3 :: Flex: Bubble Events From Custom Classes - Non-UI

Jul 24, 2011

bubble events up a class tree for none-ui components.I have a structure like this:Controller Unit of Work Child Unit 1 (Raise Event)I would like to handle the event raised in Child Unit 1 in the Controller. I've tried to set the bubble property to true but I've read that this only works for UI components.Is there a way to enable this for custom classes that are not UI components?

View 1 Replies

Flex :: Charts - Take Care Of Bubble Sizes Using MinRadius - MaxRadius

Mar 30, 2011

I have a Flex BubbleChart and I want to set my bubble sizes explicitely. I don't want flex to take care of bubble sizes using minRadius, maxRadius. I need my bubbles to be rendered with exact size value.

SOLUTION
Override CircleItemRenderer.updateDisplayList

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 :: Allowing Mouse Events To Bubble Reliably Through The Youtube Chromeless Player?

Mar 30, 2011

I'm working on a prototype that would require me being able to read and track the mouse movement over a playing youtube video. The basic code to replicate my problem boils down to this simple test case:

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

[Code]....

Expected behavior is:

Youtube player loads The label on the top right tracks the X coordinate of the mouse The number should update even when moving the mouse over the Youtube player

So far the program behaves as expected when running from the IDE (tested on both FlashDevelop and FlashBuilder) and even when running the file manually from the output folder. But, alas, when I try to run it from anywhere else than the debug folder (be it another location on my computer or up on a webserver), the Youtube player seems to eat the events.

I don't get sandbox security warnings when debugging (thanks to allowDomain("*")) but I'm running out of ideas on why the program fails once you take the file out of the debug folder.

View 1 Replies

Position Item Using X And Y Co-ordinates?

Apr 26, 2009

allowing a user to enter there own x and y co-ordiantes and then a rectange gets position in the x and y co-ordinates declared

View 4 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

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

Mar 4, 2011

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

[code]......

View 2 Replies







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