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


Similar Posts:


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

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 :: Select & Deselect Same Item In <s:List> With A Mousedown?

Dec 14, 2010

In Flex 4, I have a Spark List component with item renderers. I would like to select an item in the List by clicking on it, and deselect it also, by clicking on the same selected item. Like an on/off switch.

My item renderer has the following states:

<s:states>
<s:State name="normal"/>
<s:State name="hovered"/>
<s:State name="selected"/>
</s:states>

so I tried to add a click event listener to the item renderer with:

private function selectUnSelect():void {
if (currentState == 'selected') currentState = 'normal';
else currentState = 'selected';
}

with an awkward behaviour... where the item stay selected even after clicking it again in the selected state.

Think of using the List component without the Command (on mac) or the Control button on windows.

View 2 Replies

Flex :: Unable To Select Item In Spark.components.List After De-selection

Dec 21, 2010

I have a spark List defined as:

<s:List id="symbolList" dataProvider="{symbolListCollection}" change="symbolNameChangeHandler(event)"></s:List>

With the change handler defined like this:

protected function symbolNameChangeHandler(event:IndexChangeEvent):void {
symbolList.validateProperties();
changeSymbolView(symbolList.selectedItem);
}

and symbolListCollection as an ArrayList filled with Strings.

At first, the change event works fine, and I get what I expect.

However, if I Ctrl-click on the selected item, to de-select it, i am unable to ever select an item again.

When I click on something to try to select it, the change event DOES fire, however, the ItemChangeEvent has both oldIndex and newIndex set to -1

View 1 Replies

Flex :: Flash - Programmatically Select An Item In A List After DataProvider Is Updated?

Jan 2, 2011

I have a Spark List container whose dataProvider is bound to a result set coming back from a RemoteObject call. Pretty standard stuff.

<s:List id="list" dataProvider="{model.stuff}" width="100%" height="100%"
selectedIndex="@{selectedSlider.value}"
itemRenderer="{stuffRenderer}">
</s:List>

The selectedIndex is associated with an HSlider, but that is not the problem. My issue is that I would like to automatically select a certain "preferred" element from the list (only initially...to guide the user).

I tried to do that in a creationComplete event but my data hadn't shown up yet...setting selectedIndex didn't work..

View 3 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 :: Spark List Component Item Order

Oct 17, 2011

I have a regular spark list which is sorted correctly when no item renderer is used. However, when the following item renderer is used, the list shuffles and displays items from previous instances of the list.[code]

View 2 Replies

Flex :: Refresh The Itemrenderer Of Each Item In The List Component

Mar 1, 2012

I have the list shown below:

<s:List id="list2" width="100%" height="100%" dataProvider="{ recordingsShown }"
itemRenderer="components.VideoItemRenderer2"
selectedIndex="0" visible="false">

[Code].....

View 1 Replies

IDE :: List Component: Selected Item To Be Unaffected Even Rolled Over

May 6, 2010

I can still keep the color of selected item even if it's rolled over? In my code, I have specified both the selectionColor and rollOverColor as below:

videoList.selectionColor = "0xCC0033"; //red
videoList.rollOverColor = "0xE9F3FF" //light-blue

It works well except when the selected item is rolled over. When the selected item is rolled over, it changes the color from red to light-blue. I want the selected item to stay red even when it's rolled over, but haven't found a way to achieve this.

View 2 Replies

ActionScript 3.0 :: List Component - Return Number Of Item Clicked?

Feb 26, 2010

I have populated a List component with data from an XML file. I simply want the index of the line clicked returned so I can gotoAndStop to that Frame number. I have found the 'selectedItem' property but I don't want the text, I want the number of the line.

View 5 Replies

Flex :: Scroll To Selected Item In Spark List Component?

Oct 21, 2009

I'm setting selected element in s:List component with Actionscript, it works, but List doesn't scroll to selected item -- need to scroll with scrollbar or mouse. Is it possible to auto-scroll to selected item

View 8 Replies

Flex :: List Item Renderer IMAGE Preview Component?

May 20, 2011

I have found something good here. [URL]..The mouseover effect on the list item is good. Any ideas to make this look.. I can infer that this is happening on mouseover of the Image Component. I think this is similar to google image search preview of images. If anyone have come across a component similar to this kindly share it to me and to all.

View 1 Replies

Make An Item Editor In Flex List Component Commit It's Changes?

May 19, 2009

I have a list component and I have an item editor for the items in the list. I would like to have a button that the user clicks once they are done with their changes because I am having them edit multiple pieces of data in the editor and I would also like to validate the data before closing the editor as well. I just don't know what to do on the button's click event to make the item editor close and commit it's changes to the data provider.

View 3 Replies

List Icon Using Add Item Function?

Aug 24, 2009

I try to list add the icon used the additem function but it just can display the lable name that icon function didn't work. I convert the icon type movie clip , shape and icon that still can't dispaly in the list. Actually, I want dynamic list let user choose the icon.

View 2 Replies

Flex :: Selecting One Particular Data Item?

Jul 9, 2010

I've created an Flex app. It currently has an drop down menu. With the option to select a Channel. Once the channel is selected the data pulls through. But, what I want to do is just pull through one channel of data as opposed to multiple items of data. How can I achieve this?

My code is quite simple at the moment and looks like this :

<mx:FormItem label="Select your Channel : " x="296" y="0">
<s:DropDownList id="channelSelection"
dataProvider="{channelList.lastResult.channels.channel}"

[Code].....

View 1 Replies

Flex :: Selecting One Particular Data Item From XML

Jul 12, 2010

I've followed the Flex in a week example, with the drop down menu that pairs the XML data to the XML node set.For the project I am creating, I am just pulling through ONE XML file containing just one node into my application.I am using HTTPService and pulling the data through, but at present the only way for this to work is by using the <s:DropDownList>[code]

View 1 Replies

ActionScript 3.0 :: Selecting An Item On The Stage?

Jan 13, 2011

Im going to have multiple items in this game im making, and i want these items to be selectable. And i would have to be able to trace which was was currently selected.

View 1 Replies

ActionScript 3.0 :: Selecting First Item From Listcomponent

Aug 18, 2009

I've written the following code to load images in a datagridcomponent by using a listcomponent. What code do i use to automatically select the first item.[code]

View 2 Replies

IDE :: Add An Item In A List Component Which Instance Has Been Named "box"?

Nov 12, 2009

i have the following code in which im trying to add an item in a List Component which instance has been named "box". That "trace" function used there returns me "_level0.Game.replayMenu.box", so im not pointing to something undefined...

this = _root.Game.ui;
this._parent.attachMovie ("replayMenu","replayMenu",this._parent.getNextHig hestDepth ());
this._parent.replayMenu._x = 450;
this._parent.replayMenu._y = 250;
trace(this._parent.replayMenu.box);
this._parent.replayMenu.box.addItem("blablabla","b lablabla");

The problem is that my list simply doesn�t add any items at all, i've already tried using addItem({label:"blablabla", data:"blablabla"}), but it just don�t work.

View 1 Replies

Xml :: Select A Tree Item?

Sep 22, 2010

I'm working on a tree component using a XMLLIST as a data provider.

<list>
<menuItem label="Home" menuItemId="1" >
<menuItem label="Info 1" menuItemId ="4"></menuItem>

[Code]....

I need to select a nested node by the property 'menuItemId' without knowing the index.For example, select the item with the menuItemId 4.

View 2 Replies

ActionScript 2.0 :: Random Select An Array Item

Jan 8, 2007

How would i go about randomly selecting an array item?

View 3 Replies

ActionScript 2.0 :: Create Dynamic List And Associating A Picture With Each List Item?

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

AS3 :: Flash - Fl.controls.List Adding Button To List Item?

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

ActionScript 3.0 :: Letting Each User Select Only 1 Item From A Pool?

Dec 4, 2011

I'm working on an 8-user app that runs over a wi-fi network using an XML socket. All of the hardware is located inside a medium sized room in a school building.At the start of the app, each user can select 1 role from a pool of 8. However, the socket connection runs at less than realtime, probably because of latency from the wi-fi, so it's possible for two users to make the same selection at the same time. How would I prevent this?

View 1 Replies

Flex :: Unable To Select Custom Item Renderer?

Jul 25, 2009

I have made the following item renderer in mxml, but when I use it in a list for some reason I can not select it. Am I doing something wrong?

<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
horizontalScrollPolicy="off">
<mx:Script>

[code]......

View 2 Replies

Flex :: Datagrid, Select An Item Given My Data Attribute Values?

May 6, 2010

I'm using a custom component CheckBoxList DataGrid (http://blogs.adobe.com/aharui/2008/02/checkbox_selection_in_datagrid.html) and as dataProvider I have an ArrayCollection with items such this one:

name="item name" selected="true"

I would like the CheckBox list updated when the selected attribute is set to false or true in the data model.

View 1 Replies

Flex :: Show Email In Textbox When User Select Any Item In The Grid?

Feb 2, 2010

i have following xml

<?xml version="1.0" encoding="UTF-8" ?>
<Users>
<User>
<ID>SMSUser(63)</ID>

[CODE]...

How can i show Email in textbox when user select any item in the grid?

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







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