Scroll one item in List component

Hello!
I use List component for song list in my flash music player. Everything works ok except for one problem - when the name of the song is too long, user can't read the full name of the song. One solution would be to use the horizontal scroll bar, but I have a better solution on mind: would like the current song automatically scroll (go around like in mp3 players). I guess I have to get current song's DisplayObject, to change it's x coordinate, but how? Maybe there are other solutions?
Thanks in advance,
elvman

Oh, I forgot to mention that I am using ActionScript 3.

Similar Messages

  • Cannot get more than 8 item in list component

    Hi,
    I can't get more than 8 items in list component using getItemAt(), it returns null. I will search more for this but no result.
    Please Help me here to move to next step.
    Thanks
    Sureshkumar G

    If you're asking if you can overall, yes you can:
    http://help.adobe.com/en_US/as3/components/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f41.html
    If you're asking if you can do this in the same context, off-screen, no you still get the same error as the .enabled property.
    I hate to throw a hunch but I feel as though Adobe is employing something I'm used to in native iOS programming (Apple Devices). In lists they have something called "dequeue". It's the reason an extremely long list scrolls smoothly. What it does is render ONLY the rows that are in view. When a row is about to scroll off view it deallocates it from memory and then recreates the next row. They do this so you only ever have the current amount of viewable rows in memory and it speeds up scrolling. Although, I can make property changes to items in an iOS list that's off-screen so they don't have this issue ;(.  Just food for thought.
    I'd submit it to the bugbase and see what Adobe states. They may say they intend you to get the item in view, alter it and then go back to your previous position. That would be silly but at most I can tell you I definitely get errors trying to access an element outside my view. They're probably not used to items needing visual toggles when you can't even see them.
    edit:
    On a further note I tried the scrollToIndex() method, tried to disable, that much worked fine. The second I then scrolled back to the previously selected index the list screwed up.
    I even daisy chained functions a second apart (30 frames worth of wait). I scrolled down and that worked so I waited 1 second. I disabled the visible item I wanted to and that worked so I waited another second. I scrollToIndex(0) to get back to the top of the list, the list blew up. Random items (several items) were disabled and the one that I explicitly disabled was enabled.

  • Highlighted default item in list component???

    I can't seem to find how to have an item in a list component
    highlighted by default. I'm sure its right there in the docs
    staring me down, but I dont see it.
    I've found scrollToIndex method, but that doesnt seem to
    actually highlight the index item. How do I highlight an index item
    in a list in as3?
    Thanks,
    Matt

    Oh, I forgot to mention that I am using ActionScript 3.

  • Removing items from List Component

    Below is a function set that's used to get info from an XML
    source(s) and populate a List Component (videoList). Works great.
    The second function loads data from a separate XML source and
    populates the SAME List Component. When the second function is
    called it loads the data in addition to the existing data into the
    List Component. I want it to REPLACE the data. How would I
    accomplish this?
    public function getXMLdata(event:Event):void {
    var campXML:XML = new XML(xmlLoader.data);
    var vid:XML;
    for each(vid in campXML.vid) {
    videoList.addItem({label:vid.attribute("desc").toXMLString(),
    data:vid.attribute("src").toXMLString(),
    text:vid.attribute("text").toXMLString()});;
    videoList.selectedIndex = 0;
    videoList.addEventListener(Event.CHANGE, playnewvid);
    FLVPlayer.source = videoList.selectedItem.data;
    FLVPlayer.pause();
    clipText.text = videoList.selectedItem.text;
    public function getXMLdata2(event:Event):void {
    var nflXML:XML = new XML(xmlLoader2.data);
    var vid:XML;
    for each(vid in nflXML.vid) {
    videoList.addItem({label:vid.attribute("desc").toXMLString(),
    data:vid.attribute("src").toXMLString(),
    text:vid.attribute("text").toXMLString()});;
    videoList.selectedIndex = 0;
    videoList.addEventListener(Event.CHANGE, playnewvid);
    FLVPlayer.source = videoList.selectedItem.data;
    FLVPlayer.pause();
    clipText.text = videoList.selectedItem.text;
    }

    That took 2 minutes! Works like a charm Manno. Thank you for
    your response.
    For those curious, here's the solution:
    public function getXMLdata(event:MouseEvent):void {
    videoList.removeAll();
    var campXML:XML = new XML(xmlLoader.data);
    var vid:XML;
    for each(vid in campXML.vid) {
    videoList.addItem({label:vid.attribute("desc").toXMLString(),
    data:vid.attribute("src").toXMLString(),
    text:vid.attribute("text").toXMLString()});;
    videoList.selectedIndex = 0;
    videoList.addEventListener(Event.CHANGE, playnewvid);
    FLVPlayer.source = videoList.selectedItem.data;
    FLVPlayer.pause();
    clipText.text = videoList.selectedItem.text;
    public function getXMLdata2(event:MouseEvent):void {
    videoList.removeAll();
    var nflXML:XML = new XML(xmlLoader2.data);
    var vid:XML;
    for each(vid in nflXML.vid) {
    videoList.addItem({label:vid.attribute("desc").toXMLString(),
    data:vid.attribute("src").toXMLString(),
    text:vid.attribute("text").toXMLString()});;
    videoList.selectedIndex = 0;
    videoList.addEventListener(Event.CHANGE, playnewvid);
    FLVPlayer.source = videoList.selectedItem.data;
    FLVPlayer.pause();
    clipText.text = videoList.selectedItem.text;
    }

  • Show/hide items in list component possible?

    Hi all,
    I'm quite a newbie in Flash, and more so in components.
    Currently, I'm working on a project that works in this way:
    I've got a combo box with 5 items, and a list with 10 items. The
    combo box works like a filter and when selected on an item, the
    list should only show items pertaining to the selection. For eg, my
    5 items in the combo box are the alphabets A,B,C,D,E. My 50 items
    in the list are some country names. So when "C" in the combo box is
    selected, the list should display countries starting with C, like
    Canada, China, and so on..
    Let's say my indexes for C in the list are 10-15, is it
    possible to hide items with index 0-9, and 16-49? I tried searching
    but it seems there isn't a show/hide function for list
    components.

    quote:
    Originally posted by:
    NedWebs
    What you can probably do is rewrite the list each time a
    combo box selection is made. Have the full list as an array, so
    that when a combo box selection is made, its change function clears
    the list and then rewrites it based on matching the combo box label
    to the first character of each array element.
    Thanks, your comments helped!

  • POST all items from list component

    I've got an "List-component". Within this component I have an
    x amounth of data-values liked to a "label". I would like to POST
    those data-values to my server (in this case PHP, but thats not
    important). I would like to do this together with
    "TextInput-component".
    To be clear. I don't want to post just the selected values,
    but all de values in the List-component. Who can help me?

    Loop over the dataProvider, and build whatever data transport
    structure you like, then POST that.
    I am partial to XML.

  • Make header visible if more than one item in list

    I am trying to create a report using LiveCycle/Acrobat, i.e. the form is created as a dynamic pdf in livecycle. I will open it with acrobat and import data.
    To simplify the report, it has two columns
    Client    Date Seen
    Not all clients have ever been seen, and I would like the report to look something like:
    Joe Blow    Date seen
                     may 5
                     june 16
    Mary Smith Date seen
                      july 23
    John Smith
    Fred Jones   Date seen
                      jan 14
    The important point there is that for John Smith, who has no instances of being seen, I want to make the header (Date seen) invisible.
    If it was a form into which someone was entering data, I would do something like (on the Exit event):
    if (Date.rawValue == null)
    {parent.parent.HeaderRow.presence = "invisible"}
    else {parent.parent.HeaderRow.presence = "visible"}
    but when I import XML data I don't think there is an "event".
    I suspect what I have to do is insert a script object, and I think it needs to be called somehow after the "Import Data", and I suspect it needs to loop through all the nodes and work out which instances of the HeaderRow should be invisible, and which invisible, but I'd appreciate some guidance.
    Thanks,
    Jon

    Use the forum for Livecycle Designer.

  • How to drag and drop item from list to another item in list and change their positions

    I have a list field with multiple items. I want to select one item from list and drag and drop to another item in the list
     after drop item on another item the position of items should be change. (Example:- if I select 1st item from list and drag and drop this item to 4th item in list after drop that item position of both item should be changed 1st item on 4th position and 4th item on 1st position)
    I don't know how to do this.Please help me to find the solution.

    Hello Zoltan,
    I do not believe that kind of option is built into the listboxes, but I was able to have similiar functionalities using property nodes. I have included an example program that I put together.
    The big difference is that instead of dragging, you double click on the item you want to transfer. To highlight items as you go down the list, all you need to do is set the value to that list number.
    Hope this helps you out!
    Attachments:
    Temp.vi ‏33 KB

  • 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

  • List component scroller eventlistener for finished scrolling ?

    I have a list component which contains an item renderer. I would like to know if it is possible to detect when the scoller that is built into the List has finished scrolling can fire an event. Is there a built in eventlistener ?

    Arrghh, not the right one. I am also moving the scroller bar by using a linkbar to tab the scrollbar to different positions. I need to fire an event when the scroller has reached those new positions. The FlexEvent.CHANGE_END only works when you use the scroller manually.

  • 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

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

  • No way to scroll to items not in initial iTunes list

    OSX 10.8.4, iTunes 11.1.3. I am flumoxed by the UI, and unable to scroll/select items beyond the initual iTunes browser list.
    For example:
    https://itunes.apple.com/itunes-u/multicore-programming-primer/id341597759?mt=10
    There are 31 items listed at this link. Select any one ("View in iTunes")
    This brings up the iTunes "browser."  In my view, 18 of the 31 ectures are listed. Below that, there is the text "Total: 31 items"
    My problem: How do I get to item 19 and above? There is no listing scroller, key combination, sorting (although the column headers have carots!) or alternative View I can find to reach them. The browser scroller only scrolls the page, not the list inside the page.
    (I know I could do some search if I know the specific title not appearing or go to youtube for this particular series, but... I may not always know that and it shouldn't be this hard).
    Thanks.

    Tracy,
    I compose music for TV and the media. iTunes is a great way to have all my material (and material from other sources which I use) for organising and quick review.
    I have thousands of pieces of music, and effects, which I use. Often I don't want , or don't have the time, to listen to each piece all the way through. A waveform display is a really useful indication of what's going on dynamically in a piece: whether it has pauses or not, whether it's generally loud, soft, rhythmic, dynamically varied, and so on.
    I know iTunes was not intended to be a professional tool, but there are countless professionals who appreciate all you can do with it so far. So being able to "see" the audio via waveform display would be a major enhancement for many users in the media/audio field.
    Does that explain it ;-)?
    thank you & best wishes
    Nigel
    G5 Dual 2.5 /4.5 GB RAM   Mac OS X (10.3.8)  

  • List component mousewheel scrolling

    hi there....I have a dynamically generated list component
    however it seems scrolling with the 'mouse wheel' is not set by
    default. How can I do this in AS3?
    If my List component is
    var newList:List = new List();
    how do I set the mouse wheel scrollin?
    Thanks!

    Arrghh, not the right one. I am also moving the scroller bar by using a linkbar to tab the scrollbar to different positions. I need to fire an event when the scroller has reached those new positions. The FlexEvent.CHANGE_END only works when you use the scroller manually.

  • 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

Maybe you are looking for

  • C00D118E: You device is using an outdated driver that is no longer supported by Windows Media Player

    Hi, I have Treo Pro trying to sync with my library in WMP 11... I'm getting error "C00D118E: You device is using an outdated driver that is no longer supported by Windows Media Player"... Tried to install pTune with no luck... Tried to Google it with

  • Navigation between different componets in IC Web Client for CRM 7.0

    Once the user click save button in component ICCMP_BT_BUTTON I need to navigate to component ICCMP_BT_SVO that displays the Service Order Data and display the new Service Request that was created. How can I do navigation between different componets i

  • Not able to delete inbound delivery.

    Hi Gurus, Please help me delete inbound delivery. I have a ticket where user is not able to delete inbound delivery. I tried to delete this delivery and I'm also getting the same errors that user is getting. I have tried to insert real screen shots f

  • Calculating DELTAs

    Hi In discoverer in need to write a report, that shows deltas, i.e. columns showing difference between two days data. Let me give a simple example: Name Age Tennis Score (delta) Soccer Score (delta) Pat 25 4 2 Amy 23 5 3 Matt 21 6 7 where deltas are

  • I want to develop using Xperia S, but hang in adb configuration...

    I'm using Windows 7 Home Premium. Installed Android SDK, and running. Installed PC Companion 2.1, running ok. When connect using USB my Xperia S, with "USB DEBUG" activated, an error installing driver "SEMC HSUSB Device" appear (no driver, at all). I