List component with suboptions

Is it possile to have a List component in Flash CS5-AS3 that has options and suboptions (and even sub-suboptions)-sort of like a vertical menu?
I've searched here in the fourm but have not found any info on this. Any sample site or tutorial?
Thanx

Sure you can do this, although it's not that straighforward. You'd need to play around with the cellRenderer property of the List component, then with this very property of the rendered item.

Similar Messages

  • How can I select an item from a list component with a seperate button

    This is a repost, I decided it'd probably be better here than
    in the general discussion board. I will try to delete the other
    one.
    Hello Everyone,
    This is my first post here. I am trying to figure out how to
    select an item within a list component with a button. This button
    is calling a function. I have searched for the past 3 hours online
    and I can't find anything about it. I thought perhaps I could set
    the selectedItem parameter, but that is read only, and I believe it
    returns an object reference rather than something like a number so
    even if i could set it, it would be pointless. I also found a get
    focus button, thought that may lead me somewhere, but I think that
    is for setting which component has focus currently as far as typing
    in and things like that. I am lost.
    Basically I am looking for a way to type this
    myList.setSelected(5); where 5 is the 5th item in the list.
    Any help would be much appreciated.

    Never mind found it. It is the property called selectedIndex
    and it is writable

  • Need help displaying images with List component for Flash CS4 (ActionScript 3.0)

    Hi folks:
    I am an inexperienced user of Flash CS4 Pro (v10.0.2). I am attempting to use the List component with ActionScript 3.0 to make a different image display when a user clicks each item in a list.
    I did find a tutorial that showed me how to make different text display using a dynamic text box and the following ActionScript:
    MyList.addEventListener(Event.CHANGE, ShowSelectedItem);
    function ShowSelectedItem(event:Event):void {
        ListText.text=MyList.selectedItem.data;
    ...where My List is the instance of the List component and ListText is the dynamix text box. In this case, the user clicks an item in the list, defined by the label value in the dataProvider parameter of the List component, and text displays as defined in the data value in the dataProvider parameter.
    However, as I mentioned to start, what I really want to do is make images display instead of text. Can anyone provide me the steps to do this?
    I appreciate your help (in advance)!!
    Cindy

    Hi...thanks for responding! I was planning on using images from the Library, but if there is a better way to do it, I'm open. So far, I just have text in the data property. This is part of my problem. I don't know what I need to put in the data value for an image to display. Do I just put the image file name and Flash will know to pull it from the Library? Do I need to place the images on the stage on different frames? I apologize for the "stupid user" questions, but as you can tell, I'm a newbie.
    Appreciate your patience and any help you can offer!
    Cindy

  • List Component Links

    I have created AS3 script for loading and parsing an RSS
    feed. I have successfully displayed the "title" node on the stage
    in a List Component with the instance name "blogList". Now I wish
    to use the corresponding "Link" node so that each item in the list
    will open a web page to the link for that story. I have been able
    to get each title to link to the last URL link in the RSS feed. I
    am stumped. Help :)

    Answer from the boys at actionscript.org.
    Works like a charm. The function for click is outside of the
    function blogLoaded and most importantly used the data property on
    the object in order to pass the correct reference.
    var blogLoader:URLLoader = new URLLoader();
    var blogURL:URLRequest = new URLRequest("
    http://www.canada.com/calgaryherald/topstories.rss");
    blogLoader.addEventListener(Event.COMPLETE, blogLoaded);
    blogLoader.load(blogURL);
    var blogXML:XML = new XML();
    blogXML.ignoreWhitespace = true;
    function blogLoaded(evt:Event):void {
    blogXML = XML(blogLoader.data);
    //trace(blogXML);
    for(var item:String in blogXML.channel.item) {
    blogList.addItem({label:blogXML.channel.item[item].title,data:blogXML.channel.item[item]} );
    blogList.addEventListener(MouseEvent.CLICK, blogClick);
    function blogClick(e:MouseEvent):void {
    navigateToURL(new
    URLRequest(e.currentTarget.selectedItem.data.link));

  • List Component multipleSelection and wmode

    I'm trying to use the list component with multipleSelection
    set to true; however when I set wmode to transparent in FireFox the
    multiple selection breaks. It appears to function properly in IE.
    Does anyone know of a workaround for this?
    Thanks in advance!

    "however, we need wmode set to false"
    So what exactly is the problem then... if you need wmode set
    to false, then don't add the param and you won't have it.

  • List Component - return number of item clicked

    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. Thanks.

    You said you wanted the index of the line clicked, so you don't need to look further than the selectedIndex value.  There is no data property for the selectedIndex value (which is merely a number);
    trace(event.target.selectedIndex);
    Now if your intention is to associate this with a frame number, then you have to adjust for index values starting at 0 and frame numbers starting at 1.

  • Width for List component

    I create a List component with Strings using addItem( {
    label:some_string, data:some_data } ) in a loop. I want to set the
    width of the List based on the width of the widest Item. I assume
    the labels must be displayed as TextFields but how do I access the
    individual TextFields to get there widths?

    That will depend on what layout manager you use and what you constrain the list with.

  • Help with a vertical scroll bar issue with a List component

    hi. i have a basic <s:list> that uses an XMLListCollection as it's data provider and a very basic itemrenderer. when a row in the list is clicked a function gets the list.selectedIndex then populates some text fields with more xml data. that all works fine.. the problem i have is that the vertical scroll bar on the list seems to be "clickable" - just like a row in the list. the scroll bar scrolls normally but when it's clicked the selectedIndex becomes -1 which is not helpful b/c the value -1 is passed to the XMLListCollection.
    any ideas? cheers.

    thanks but still problematic...surely the <s:List> component shouldn't return a value when the scrollbar thumb is clicked? i created a very basic list (see below) and made the list dimensions short enough so that there is a vertical scrollbar and found that when the scrollbar thumb is clicked the trace(event.currentTarget.selectedIndex) returns a number. that's annoying b/c i just want a selectedIndex value for a row that is clicked not the scrollbar.
    any ideas to get around? cheers
    <fx:Script>
    <![CDATA[
    protected function list1_clickHandler(event:MouseEvent):void
    trace(event.currentTarget.selectedIndex);
    ]]>
    </fx:Script>
    <s:List x="162" click="list1_clickHandler(event)" y="276" labelField="@label" width="144" height="153">
    <s:dataProvider>
    <s:XMLListCollection>
    <fx:XMLList xmlns="">
    <node label="one"/>
    <node label="two"/>
    <node label="three"/>
    <node label="four"/>
    <node label="five"/>
    <node label="six"/>
    <node label="seven"/>
    <node label="eight"/>
    <node label="nine"/>
    <node label="ten"/>
    <node label="eleven"/>
    </fx:XMLList>
    </s:XMLListCollection>
    </s:dataProvider>
    </s:List>

  • IPhone Scroll Component with Item Renderer, which can list Facebook friend list.

    Hi,
    I am working on a project, in which i have to show facebook friends of user in a list which can scroll. I have made the component with scrolling functionality but, the scrolling is not working fine. Any ideas about the scroll.
    Thanks in advance.
    Vipul

    Hi,
    Yaa, I have made my own component, and it is working fine, but when number of facebook increass, the mouse over event doesn't work, and tapping scroll freezes.
    Can you suggest me some way so that i can dipatch that mouse over event repeatdly.
    Vipul

  • Problems With List Component Flash Cs3

    Hello Friends,
    I am working in Flash Cs3.
    I am having a List component in my application.
    I added 10 items into my list component. Now out of those 10 items, i want to disable particular list items like Item 4, Item 8, Item 9. How to do this using flash cs3 or flash 8.0.
    Item1   --  Enabled state
    Item2   --  Enabled state
    Item3   --  Enabled state
    Item4   --  Disabled state
    Item5   --  Enabled state
    Item6   --  Enabled state
    Item7   --  Enabled state
    Item8   --  Disabled state
    Item9   --  Disabled state
    Item10 --  Enabled state
    Any suggestions/ideas would be really appreciated.
    Regards,
    Rajesh

    Hello Friends,
    I got a partial solution for this. Now i can able to disable a particular list item using flash cs3. I achived this. But it was happening only after clicking the item values....
    But i need in a diff way like, as soon as you run the flash file it has to disable. how is this possible in flash cs3.
    this is the code :
        import fl.controls.List;
        import fl.controls.listClasses.CellRenderer;
        import fl.controls.listClasses.ListData;
        import fl.events.ListEvent;
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.text.TextField;
            var sampleItem1:Object = { label:"John Alpha" };
            var sampleItem2:Object = { label:"Mary Bravo" };
            var sampleItem3:Object = { label:"Trevor Gamma" };
            var sampleItem4:Object = { label:"Susan Delta" };       
            var myList:List;
            var tf:TextField;
      ListDataExample()
             function ListDataExample() {
                createList();
                tf = new TextField();
                tf.x = 10;
                tf.y = 125;
                addChild(tf);
             function createList():void {
                myList = new List();
                myList.move(10,10);
                myList.addItem(sampleItem1);
                myList.addItem(sampleItem2);
                myList.addItem(sampleItem3);
                myList.addItem(sampleItem4);
                myList.rowCount = 4;
                myList.addEventListener(ListEvent.ITEM_CLICK,listItemSelected);
                addChild(myList);
             function listItemSelected(e:ListEvent):void {
                var cr:CellRenderer = myList.itemToCellRenderer(e.item) as CellRenderer;
                var listData:ListData = cr.listData;
       if(cr.listData.row == 2) {
        cr.enabled  = false
                tf.text = "Row selected: " + listData.row;
    waiting for your replies.
    Regards,
    Rajesh

  • How to populate list component via xml file?

    There is a TextArea component that should show the name and
    the description of the item selected in the list component. But I
    dont know how to populate list with external XML and what should be
    the coding in flash as well as what should be written in the XML.
    Please help.

    Here's an xml file listing a couple of brother comedy teams:
    <?xml version="1.0" encoding="UTF-8"?>
    <team>
    <brothers>
    <Marx>
    <name>Groucho</name>
    <name>Chico</name>
    <name>Harpo</name>
    <name>Zeppo</name>
    <name>Gummo</name>
    </Marx>
    <Howard>
    <name>Moe</name>
    <name>Curly</name>
    <name>Shemp</name>
    </Howard>
    </brothers>
    </team>
    Open a new .fla and save it in the same folder as the .xml
    file. Place a List Component on the Stage and name it (in this
    case, "comicTeams_list"). In the first frame write the following
    ActionScript:
    //create XML object and load external xml file
    var broList:XML = new XML();
    broList.ignoreWhite = true;
    broList.onLoad = processList; // this is a function that will
    be written below
    broList.load("populateList.xml");
    function processList(success:Boolean):Void{
    if(success){
    loadList();
    }else{
    trace("Load failure");
    function loadList():Void{
    var broName:String;
    var listEntries =
    broList.firstChild.childNodes[0].childNodes[0].childNodes.length;
    for(var i:Number = 0;i<listEntries;i++){
    broName =
    broList.firstChild.childNodes[0].childNodes[0].childNodes
    .childNodes[0].nodeValue;
    trace(broName);
    comicTeams_list.addItem(broName);
    //to make something happen when you click on a name in the
    List, create a Listener and function
    var broListListener:Object = new Object();
    broListListener.change = someAction; //"someAction" is a
    function to be written shortly
    //add the Listener to the List
    comicTeams_list.addEventListener("change", broListListener);
    function someAction(evtObj:Object):Void{
    var pickedBrother:String = evtObj.target.selectedItem.label;
    //write actions here, referencing pickedBrother variable
    The names of the Marx Brothers will appear in the box.
    This is written in AS2. When you post a question, it's a good
    idea include which version of ActionScript you're using.

  • Count the rows in a list-component

    Hi,
    How can I count the rows with a value in a list component?
    I thought it would be RowCount but as I figured out that shows the number of shown rows, not the number of rows with a value.

    Hi,
    Try list.dataProvider.length

  • Data Grid in a List Component???

    Hi there!
    I have a populated List Component set to Multiple Selection.
    This list contains titles of a magazine issues.
    I wish to allow the user to select one or more items in the
    list and enter the quantity of the selected issue(s) he/she wants
    to receive.
    Is it possible to achieve this with a Data GRid integrated in
    the List Component or which simplier solution must I contemplate?
    I thank you in advance for indicating the best way to
    explore.
    Best regards,
    Gerry

    Hi GWD and thanks for responding.
    I fully understood your explanations and the example you
    provided.
    I'll give it a try, for sure.
    But I want to know:
    - How do I populate a DataGrid Component? Like a List
    Component? (you said they are quite the same, I assume methods to
    apply are identical...)
    -In the same way, I can pull out the data from a DataGrid as
    I do for the List, right?
    Thanks again!
    Best,
    gerry

  • Remove duplicate entry in list component

    I have a list component which loads xml into it. I have
    multiple entries in the list that are the same and i want to remove
    the duplicates. if anyone has an idea or hint it would be
    appreciated.
    Thanks

    "Rain1522" <[email protected]> wrote in
    message
    news:ebamrt$s5h$[email protected]..
    >I have a list component which loads xml into it. I have
    multiple entries in
    >the
    > list that are the same and i want to remove the
    duplicates. if anyone has
    > an
    > idea or hint it would be appreciated.
    >
    > Thanks
    >
    > function loadGulf(){
    > import mx.xpath.XPathAPI;
    > var cityXml:XML = new XML();
    > cityXml.ignoreWhite = true;
    > cityXml.onLoad = function(success:Boolean) {
    > trace("onload...");
    > if (success) {
    > trace("success...");
    > // Retrieve all Cities notes within /document/City.
    > var thePath_str:String = "/document/City"; // path of
    nodes
    > var plan_array:Array =
    XPathAPI.selectNodeList(this.firstChild,
    > thePath_str);
    > for (var i:Number = 0; i < plan_array.length; i++) {
    > var planArray = plan_array
    .firstChild.nodeValue;
    >
    > function checkMatch(compare:String) {
    > for(j=0;j<myList.length;j++){
    > if (myList.getItemAt(j).label==compare){
    > return true;
    > }
    > }
    > }
    >
    if(checkMatch(plan_array.firstChild.nodeValue)!=true){
    > myList.addItem(plan_array
    .firstChild.nodeValue);
    > }
    >
    > }
    > } else {
    > trace("error loading XML");
    > }
    > };
    > cityXml.load("new.xml");
    > }
    > loadGulf();
    >
    I have a book with a function for quick searching arrays, but
    it is at work.
    If not answered by tomorrow morning then I will try to
    remember to post a
    solution.

  • List component trouble

    Hello!
    I have some trouble with the list component in my
    application. The thing is that the keyboard interaction don't work
    proper. I've found out that it is my function "transferParameters"
    who spoils it. The function looks like this:
    Object.prototype.transferParameters = function(ref)
    var i;
    for(i in this)
    ref[ i ] = this[ i ];
    I am using the function to duplicate objects without making
    the instances refer to each other.
    What should I do to get the keyboard interaction to work?
    Regards Toben

    Nope that doesn't seem to solve the problem. I tried putting
    the listListener function and all the variable definitions outside
    of the onData, but still have the same problem! Is there a thing
    with the List component that you have to click into them before
    they're activated or something? Or might it be something with
    Firefox? It works almost all the time in IE.
    Thanks,
    Mukul

Maybe you are looking for

  • Step E2E RFC Details

    Dear Experts, I am configuring the managed system on SOLMAN_SETUP transaction and in the step - Configure Diagnostics, I got this error message: The definition of the READ RFC to the managed system could not be found. Please make sure to run the RFC

  • SPFILE Damaged, Cannot Start Database

    hi experts, This is 9.2i on Windows. I have corrupted my SPFILE for this 9i db (I think that's my problem) Within RMAN, I've tried to Startup mount; That gives error ORA-16032 "parameter LOG_ARCHIVE_DEST destination string cannot be translated" I hav

  • ACE Cold Standby

    Hi, I've got an question about ACE modules in HA, when one of the switch is reloaded a couple of the ACE contexts come up in cold standby. I've check the config in the contexts to confirm that they match and the same ft interface is used by all conte

  • "original file could not be found" message

    In my itunes library, I used to get an option to "clear" a song if I right clicked it. Now there is only "copy." So to remove the song, I opted for the "show song file" and then manually deleted it from the folder. However, the file is still there, o

  • Bad cab file

    The cabinet file 'iTunes.cab' required for this installation is corrupt and cannot be used. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package. Tried installing/updating to iTunes 10.0.01 (or whateve