A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: List component - Add item at start of list

  1. #1

    List component - Add item at start of list

    Greetings,

    For example, I have three entries in my list of small, medium and large. They appear in the component list like this :

    Large
    Medium
    Small

    Now if I add another item to the list using AS like this :

    SelectionsList.addItem({label:"Extra Large", data:count});

    Then that entry gets put at the bottom of the list (after small).

    How can I get that entry to be inserted at the top of the list components list? (above the "Large" item)

    Thanks,
    Michael
    Last edited by durks; 08-11-2006 at 11:59 AM.

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    The List component is using array methods. here is one way to control that.

    http://livedocs.macromedia.com/flash...=00001200.html
    - The right of the People to create Flash movies shall not be infringed. -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center