ActionScript 2.0 :: Tell Which Item User Selects From A List?

Jul 29, 2005

Is there any way to tell which item a user selects from a List? I already have a "change" event listener, but that doesn't tell me WHICH item was clicked (at least, I don't think it does.)

[edit: forgot the XML part...the list is generated from an xml file:]

Code:

<?xml version="1.0" ?>
<songs>
<song display="Hallelujah Chorus: A Soulful Celebration" url="001.mp3">

[Code]....

The reason I need to know which song I'm on is so I can reference the <composer> child tag for the correct song.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Menu Bar-add Item - When The User Selects "new Game" It Should Restart The Game?

Apr 3, 2009

im creating a card game. i have a seperate timeline for the menu bar. ive placed this code on the first cell of the timeline:

Code:
import mx.controls.Menu;
import mx.controls.MenuBar;[code].....

the problem i get is that when the user selects "new game" it should restart the game. when it does this the toolbar is not reset. instead a new menu item is added (without removing the old one. so evertime the user hits new game, a new "file" menu is added). how do i make sure there is only 1 "File" menu? and im using actionscript 2

View 1 Replies

ActionScript 3.0 :: Stop Mp3's From Loading If The User Selects A Different Mp3?

Sep 17, 2010

I'm working with a lot of mp3 files and I want to be able to stop an mp3 file from loading from the server if the user selects a different mp3. How do I do this?  Here is my code so far:

[Code]...

View 9 Replies

ActionScript 1/2 :: Create A Drag And Drop Game In Which The User Selects?

Oct 31, 2011

A student of mine is wanting to create a drag and drop game in which the user selects a possible answer for a range, drags it over a object named as "dropzone". the correct answer is left over the dropzone, and the user clicks the check button they need to be sent to a frame displaying "correct" - otherwise, sent to a frame for incorrect.I currently have a set up in which the user is given an auto response using a dynamic text box and all is done on the one frame, but this student wants to be a little different.

View 3 Replies

ActionScript 2.0 :: When A User Selects A Certain Button It Unloads Main Swf And Loads Up A Different One In The Same HTML Page

Nov 14, 2007

I have my main swf embedded into a html page, and what I want is that when a user selects a certain button it unloads my main swf and loads up a different one in the same HTML page.

View 1 Replies

ActionScript 2.0 :: Change The Image And Some Text Each Time User Selects A New Category In The Html Page

May 3, 2005

I'm using mx 2004 and php, mysql. I have flash banner in a hybrid webpage that I would like to change the image and some text each time user selects a new category in the html page. There are quite a few categories. What is the best way to do this and how would I go about doing it. is there a script sample or tutorial that I could modify?

View 4 Replies

ActionScript 2.0 :: CS3 FileReference - Know The 'file Path' When An User Selects A File From 'any Location' On His Hard Disk

Mar 7, 2009

I want to know the 'file path' when an user selects a file from 'any location' on his hard disk. I like to know is it possible to fetch the entire file URL instead of the file name alone?

Code:
var fileRef= new FileReference();
fileRef.addListener(mylistener);
mylistener.onOpen = function(file){
[Code]....

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

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

ActionScript 3.0 :: Get The Y Value Of Each Item In The Tile List

Feb 26, 2009

Not sure if you guys remember flash paper or not, but basically I am trying to clone it in AS3. The layout anyway, not the actual conversion. I have my PDF pages and SWF format and I have them loading into a tile list. I want to get the Y value of each item in the tile list so I can make a page browser.

View 2 Replies

IDE :: Disable A Particular List Item In Flash Cs3

Dec 18, 2009

list component in flash cs3.

assume that i have 5 items in my list and i want to disable 3,4,5 items from mylist box. how to do this?

item 1 -- enabled state
item 2 -- enabled state
item 3 -- disabled state
item 4 -- disabled state
item 5 -- disabled state

using flash cs3, i want to achieve this

View 1 Replies

Go Into Frame 2 When The User Moves The Mouse Over Some Item?

Sep 12, 2009

ow to go into frame 2 when the user moves the mouse over some item?

View 1 Replies

ActionScript 2.0 :: [FLASH CS5] Custom List Class That Manages Custom List Item Class?

Dec 2, 2011

This is my first time working with a class attached to a movieclip that is nested inside a class attached to a movie clip.I've tested all the properties and methods of PTListItem.as and they work properly but when I try to call them on the list item through PTListTop.as it returns undefined.The end goal is to dynamically load a checklist via a txt file.

View 1 Replies

ActionScript 3.0 :: Disable A Particular List Item In Flash Cs3?

Dec 18, 2009

assume that i have 5 items in my list and i want to disable 3,4,5 items from mylist box. how to do this ??

item 1 -- enabled state
item 2 -- enabled state
item 3 -- disabled state

[code].....

View 1 Replies

ActionScript 3.0 :: Access/disable A List Item?

Apr 7, 2009

I'm looking for a way to disable a specific item within a List component. I had thought there would be something along the lines of myList.listItems[3].enabled = false like you find in many other GUI type languages, but I can find no documentation of this in Flash AS3. What confuses me is that there is Disabled_skin and Selected_disabled in the Cell Renderer skins, so obviously it's something that has been catered for - unless I've misunderstood the use.

View 4 Replies

ActionScript 3.0 :: Disable A Particular List Item In Flash Cs3

Jan 11, 2010

assume that i have 5 items in my list and i want to disable 3,4,5 items from mylist box. how to do this ??

item 1 -- enabled state
item 2 -- enabled state
item 3 -- disabled state
item 4 -- disabled state
item 5 -- disabled state

using flash cs3, i want to achieve this , how to do this?

View 1 Replies

ActionScript 3.0 :: Keeping Item At Top Of Display List?

Jan 19, 2010

I have an AS file which contains all of the code for a main menu. This code loads another AS file which initializes code for the general items that will be on the stage throughout the whole flash. But when I initialize the code for one of the menu items after it's clicked I don't know how to get 2 of the items from the stage elements code to be on top of the display list. Because, as the code for the menu item loads the two stage elements are going to cover the items from that code and after its loaded its going to open up and show them the items that are loaded from the menu item code.

View 4 Replies

ActionScript 1/2 :: Combo Box Only Displaying First Item Of A List?

Jul 21, 2011

I have a screen which is essentially an address screen. Amongst other fields. there are two fields on the screen which are used to enter the region of the user. One is a combo box,  the other is a plain text field.

After the user selects their country from a drop down list, if that country has a list of regions associated with it, a Combobox is populated and displayed,  with the text field being hidden. If there are no regions associated with the country then the combobox is hidden and the text field is displayed:

[Code]...

View 4 Replies

Flex :: Highlight Item In Spark List?

Jun 25, 2010

I have two spark lists and want to drag items from one list to the other. When im dragging an item and over the other list item, i want the target item to change the background coloer.Basically instead of showing the black line indicating that I will drop between elements, I want to see the target item highlight.

View 1 Replies

Flex :: Showing List Item Tooltips?

Oct 11, 2010

I have a list of objects containing an icon, a label, and a tooltip. I want to show only the icon and the label. The tooltips should be visible on mouse over an item.

Is there a way i can achieve this without writing my own mouse-over/out functions?

(notice that dataTips are a different thing as they are displayed only when the label is cut)

View 2 Replies

Flex :: Drag-and-drop Onto List Item?

Oct 21, 2010

I have a List with an item renderer and would like to enable drag-and-drop onto the items in the list, rather than adding the data to the list. Is it possible to find the item that is being hovered over when dragging?

View 1 Replies

Flex :: Spark List Item Renderer

Nov 29, 2010

How do I wordwrap in a spark list w/ an itemrenderer? This posting at[URL] works 100% but when I try to set a separate item renderer, I can't get the word wrapping...instead, I get an ugly horizontal scroll bar. HEre is my mxml:

[Code].....

View 1 Replies

Flex :: Removing All Iterates Through Each Item In List

Mar 12, 2011

When would you want to use removeAll() vs just new ArrayCollection when you want to clear an array collection. Remove all iterates though each item in the list. I can't see a case when I would want to use it.

View 1 Replies

Flex :: Get Changed Value Of Item From ItemRenderer In List?

Jun 22, 2011

I have a List with textInput as itemrenderer. Initially the list is loaded with data from a data provider. However since the items are rendered in textInputs, I have the ability to change the value of a particular item.

But when trying to access the value of the changed item using the function below, I still get the old value in my trace:

private function addItem(event:Event):void {
trace(myDataProvider.getItemAt(myList.selectedIndex).label);
}

what I need to do for the new value to be available. My itemrenderer is shown below:

<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[Code].....

View 1 Replies

Insert New Item In Sharepoint List From Flex?

Jul 19, 2011

i m trying to insert new item on sharepoint list from flex using sharepoint-as3-connector

[Code]...

View 1 Replies







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