List Component

Ridiculously simple, but doing my head in - how do I add
links into a list compnent - I'm really new to this actionscripting
stuff and I ain't got a clue.
I just want each item in a lst of 7 items to link to a
particular keyframe in the movie. So simple in old versions of
Flash, but can I fgure it out in Flas CS3?
Help!

Answered in .actionscript
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

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

  • 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

  • List component row manipulation

    I have two questions regarding as3 list component:
    - I'd like to highlight and keep selected the item a user last selected from my list component. I've combed the live reference as well as google and must be typing the wrong search words. I can tell what label and index an item was that was selected but am not finding a way to highlight and keep highlighted the user's choice in the list component.
    - Also, I'm exploring the notion of inline buttons within a list's rows. If a user hovers their mouse over a row, a set of small buttons come up the user can click on for further functionality. This may be more of a make your own component answer but I'm exploring it nonetheless. Any thoughts or comments on this?
    Thanks!

    no something else is going on. Or perhaps you didn't explain your problem clearly.
    After servlet b calls getList() you have two servlets each having a reference to the same list
    A------\
    List
    B------/

  • Adding Images to the List component

    Adding Images to the List component while using the FLV
    PLayback
    All, ( i can send you my source files if it would help)
    I'm using the FLV Playback component and loading videos into
    it from an external xml file. I also have a list component tied to
    the FLV playback that when you click on one of the elements in the
    list, it plays that movie.
    QUESTION:
    My question is how do I add an image to the list component?
    Below is the xml file and the actionscript. I've added the image
    attribute to the XML file as img="time_square.jpg" and added the
    element of the array when calling/creating the list. Did I do this
    right?
    Any direction would be very much appreciated.

    Adding Images to the List component while using the FLV
    PLayback
    All, ( i can send you my source files if it would help)
    I'm using the FLV Playback component and loading videos into
    it from an external xml file. I also have a list component tied to
    the FLV playback that when you click on one of the elements in the
    list, it plays that movie.
    QUESTION:
    My question is how do I add an image to the list component?
    Below is the xml file and the actionscript. I've added the image
    attribute to the XML file as img="time_square.jpg" and added the
    element of the array when calling/creating the list. Did I do this
    right?
    Any direction would be very much appreciated.

  • Using a List Component to create a photo gallery.

    This feels like a lot to be asking but i'm gonna go ahead and
    ask to see what happens.
    I'm trying to figure out how to use a list component to
    select 6 items from a large list, display the words to the 6
    selected items (in a text field), then finally (by pressing a
    button) I would like to load the 6 corresponding pictures for the
    selected items into a seperate frame. If there is anyone that could
    point me in the right direction it would be greatly appreciated. I
    have been trying to find information online about programming the
    List Component but haven't had any luck. Is there a book that
    anyone recommends that could help me? I've been doing simple
    animations and websites in flash but i'm now looking to learn some
    actionscripting as well. Thanks.

    Hi PinkPowerRanger,
    Per my understanding that you have two fields in the table "Date and Time picker" which is Date/time type and another is "Item ID", you need to get the Month from the Date field to display in the X-axis and count(Item ID) related to each
    month to display in the Y-Axis, right?
    I have tested on my local environment and can do this by create two calculated fields to get the month and year values from the Date/Time field.
    Details information below for your reference:
    Right click the main dataset to select the "Add Calculated field", specify an name of the new calculated field and add the expression in the field source as below:
    Year:    =Year(Fields!Date.Value)
    Month:  =MonthName(Month(Fields!Date.Value))
    Add the three field in the Chart as below and remember in the Value area you have got the Count(ItemID) but not SUM(ItemID):
    Preview you will got the chart like below:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • In Flash CS4,How can I give a AS3 List Component a suitable horizontalScrollBar

    In Flash CS4 when an AS3 List Component has too many rows,it will has a verticalScrollBar automatically. but it will never has a horizontalScrollBar even a part of the content of the list is hidden.
    I set the property  list.horizontalScrollPolicy="on",and set list.maxHorizontalScrollPosition=200; then the horizontalScrollBar appear
    but when I click the item of the list, all the list move to left, half of the list is hidden,
    I can only see the right part of the list, the I click the list again,the list move to right,then I can see all the list by move the horizontalScrollBar
    How can I give a suitable horizontalBar to the AS3 list component?

    Thank you for your help! (sorry,I`m bad in English...)
    In fact, it works.
    but,I made a mistake,the reason I want to give a list a horizontalScrollBar is:I want to show all content in a list that is not wide enough,
    you see,first row can show all content in this list,but in the other rows,the content is too wide to show,I want to give the list a horizontalScrollBar to show all content by draging the horizontalScrollBar to right.
    now,set property:
    list.horizontalScrollPolicy="on", list.maxHorizontalScrollPosition=30;(the result is the image above),when I drag the horizontalScrollBar to right:
    ah ha ,the row can`t show all content too,the horizontalScrollBar is related to the width of all the list, is not related to the width of the content in every row.
    now I kown why the horizontalScrollBar is always disable.
    but in design,to show a lot of content,we can`t draw  a list too wide, it`s not beatiful,so I want to use a horizontalScrollBar to show all content in every row.
    and the list is not too wide
    ah ah,  like the list in Flex4
    In fact,ah,I have not studied Flex 4,so,I have to make it by using Flash CS4 Component
    How can I do? Please
    (so sorry for my bad English,I do my best in it)

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

  • Horizontal Scroll in list component

    Hi,
    I'm using a list component which is populated from a textbox.  I've set the horizontal scroll policy to auto and also to on however  the scroll either doesn't appear (in the case of auto) or doesn't move (in the case of on).  Is there a setting which I need to modify to have the horizontal scroll working normally?
    Thanks

    I tried the invalidate method as follows but nothing happened:
    mylist.invalidate();
    Not sure if I explained myself well, I just want the horizontal scrollbar to appear and be able to move it when one or more items in the list are long and thus not all visible...thanks

  • 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

  • Custom List component in Flash builder 4.5

    Hi,
    Am new to Flash builder 4.5. I want to create a custom list component. In that i have some queries.
    They are,
    1. What are the basic procedures/steps to be followed for Component development in Flash builder 4.5
    2. What are the approaches to the component development in Fladh builder 4.5?
    3. Is there any reference sutes available?
    Thanks,
    Manikandan

    http://www.adobe.com/devnet/flex/videotraining/exercises/ex1_06.html
    you could also search blogs for custom component creation. There might be many implementations for your learning/usage.

  • Video, XML and List Component

    Hello all,
    I have this code that is suposed to take my simple little XML
    file and populate it into a List component which in turn when an
    item is click it will play the video assigned to it. I have a
    custom player built and it works perfectly when I just load in one
    movie by hard coding its path into my AS, however when I load the
    XML in it only will play the first movie in the list, and will not
    load in any other movie when selected.
    My code is below. anyone that can help it would be greatly
    appreciated. The XML code is at the bottom.

    funkysoul,
    First thanks for taking a look at what I have. To answer your
    question yes I have changed the start up movie in the Array (i.e.
    from 0 to 1 or 2 or 3) and it does play that movie first, but again
    when I click to load in another movie it does not play anything
    else.

  • Displaying items in different colors in a List component

    Hi.
    How can I make each label of an item in a List component
    appear in a different color? I can change the color of the items in
    the list, but I want the items to appear in different colors...
    Thanks,
    - Yuval

    Hi.
    How can I make each label of an item in a List component
    appear in a different color? I can change the color of the items in
    the list, but I want the items to appear in different colors...
    Thanks,
    - Yuval

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

Maybe you are looking for

  • ExecuteWithParameter with Binds on several view objects

    I thought I knew how to do this, but it has been a month or two, and can't seem to get the syntax right. I would really appreciate some guidance on this. I'm using jdev 11 to create a basic page using ADF Faces. In the model, I have three seperate re

  • Exchange tasks disappear from Outlook when they appear on the Pre

    I am using EAS on my pre, with Outlook 2007 (and Exchange Server 2007).  In Outlook, I use the calendar weekly view which shows the tasks at the bottom on the day they are due.  My pre has synced without any trouble.  However, when the reminder for a

  • How to call or not call a Trigger in same table based on condition?

    Hi How to call or not call a Trigger in below situations.. If a table contains a record of same value i.e, [i[u]]ID 1 1 3 In above ID 1 is repeated for two times. In this situations i don't want to call a trigger.. But, the value ID is for 3, now i w

  • Express (g) faster than TimeCapsule (n)?

    Very curious, I get a faster internet download when connecting to Time Capsule THROUGH my Airport Express "g" (on the floor above me), than when connecting directly to the TC sitting next to me (using a MacBook "n"). I have the TC set for WDS with th

  • Jakarta Commons -- File Upload does not work with Application Server

    Hi ALl, I tried Jakarta Commons file upload. In the netbeans, I copied the common jar files "commons-io-1.2.jar" and "commons-fileupload-1.1.1.jar" in the netbeans-5.5\enterprise3\apache-tomcat-5.5.17\common\lib and set the class paths. It is working