Deleting items in the component list

Here is a set of functions to obtain information from a source XML can fill a list item (videoList). Works very well. The second function loads data from a separate source XML and fills the SAME list component. When the second function is called, it loads the data in addition to the existing data in the List component. I want to replace the data. How do I would accomplish this?


public void 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. ("Text") attribute. ToXmlString()});

}

videoList.selectedIndex = 0;
videoList.addEventListener (Event.CHANGE, playnewvid);
FLVPlayer.source = videoList.selectedItem.data;
FLVPlayer.pause ();
clipText.text = videoList.selectedItem.text;



}

public void 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. ("Text") attribute. ToXmlString()});

}

videoList.selectedIndex = 0;
videoList.addEventListener (Event.CHANGE, playnewvid);
FLVPlayer.source = videoList.selectedItem.data;
FLVPlayer.pause ();
clipText.text = videoList.selectedItem.text;



}

Which took 2 minutes! Works like a charm Manno. Thank you for your response.

For the curious, here is the solution:

public void 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. ("Text") attribute. ToXmlString()});

}

videoList.selectedIndex = 0;
videoList.addEventListener (Event.CHANGE, playnewvid);
FLVPlayer.source = videoList.selectedItem.data;
FLVPlayer.pause ();
clipText.text = videoList.selectedItem.text;

}

public void 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. ("Text") attribute. ToXmlString()});

}

videoList.selectedIndex = 0;
videoList.addEventListener (Event.CHANGE, playnewvid);
FLVPlayer.source = videoList.selectedItem.data;
FLVPlayer.pause ();
clipText.text = videoList.selectedItem.text;

}

Tags: Adobe Animate

Similar Questions

  • Deleting items in the populated list box

    I have a drop down list fill a list box. (change: ListBox1.addItem (xfa.event.newText)) But I can add more then one of the same selection, so how to do that I remove them to the ListBox control. On click? somehow? I don't know the jargon.

    There's a selectedIndex property, which will again give the index of the element 1 is selected.

    Paul

  • How can do to enable 'Recover deleted items' in the registry using Vista I

    Using Vista and Outlook. 'Recover deleted items' is grayed out and gave instructions how to get to the registry to enable this feature. The instructions do not work because it tells you to go into the registry and down to HKEy_Local_Machine/software/Microsoft/exchange/customer/options, and then on the EDIT menu, click Add VALUE. It is not a VALUE to be added. Anyone have any ideas where to go next? Thank you

    Try a new, right click > Edit or new >
    Diane Poremsky [MVP - Outlook]
    Tips daily Outlook | Outlook & Exchange Solutions Center
    Subscribe to the weekly Exchange Messaging Outlook newsletter

  • Adding items to the QNX list without scrolling

    Is it possible to update the items in a list of qnx without scrolling of the list in article 1?

    I have a list of qnx that retrieves its list items in a stream, and if the list item has been scrolled, beyond every time that I update the dataprovider, it automatically reloads the list with 1 point on the screen.

    HM sounds quite interesting. what I would do is to find something to defines a set of data apart from others and makes every single tweet. There is probably an ID of the API or something. then id have a separate table, keep track of all the IDS in your current list. from there whenever u 'referesh' you can check if you got the identifiers in the new list differ from your current table of ID. If they are separately add each individual tweet of the new incoming list using the addItem() method instead of reset your entire dataprovider. hope that helps some. Good luck!

  • How to delete items in the Recycle Bin on their own after 90 days?

    Original title: definition of a horizon of "age-out" (time) for the items in the Recycle Bin of Windows 7.

    I want Windows 7 Recycle Bin items be aged (to delete) once they have been there for, say, 90 days. This would result in a moving window (horizon, time) on when the items from the trash would be available for restoration. It seems a local security policy or object should be available to achieve this.

    Windows does not support such a function.

  • Deleting items in the conveyor

    How to remove items from the conveyor?

    Use the ESC key.

    In the tool content collector by pressing ESC will delete the most recently selected item of the conveyor.

    The tool content of Placer by pressing ESC deletes first item of the conveyor. You can scroll the items by pressing the arrows.

  • How do I know the component list/parking list HP ELITEBOOK 840 G1.

    Hi gentlemen,

    -J' I buy a new laptop from the store. However, the list of parking is missing and now I want to know the /tradename manufacturer of each commponent inside. Please let me know.

    -For who uses HP elitebook 840 G1, if you have the same configuiration that my laptop as below. Please give me some information.

    HP ELITEBOOK 840 G1: P/N: H7M02EC #ABA S/N: CNU413CRRY

    I have 5 Core 4200u

    128 GB SDD: what is the manufacturer? (seagate West, sandisk,...)

    RAM 4 GB x 2: what is the manufacturer?

    Charger 65 w: Let me know the serial number and production number.

    Thank you!

    Hello

    Looking for an impossible mission. But for some components, you can check yourself by using the device (SSD) Manager or another tool like CPU - Z (for RAM). For the charger, each has its s/n.  You can find the following list with all reference numbers:

    http://PartSurfer.HP.com/search.aspx?SearchText=H7M02EC

    Kind regards.

  • Deleting items from the taskbar removes desktop as well

    Elements of the desktop icon began appearing in the toolbar {(Articles 4 et 5).} If I click on one of these elements of the taskbar right-click and delete it, it is removed from the bar spots and the office.  Another element of the office appears on the taskbar.  The desktop and the taskbar are somehow.  This just started today.

    If you right click on the taskbar you can create a toolbar from the Office

    --
    ..
    --
    "DavidMCandy" wrote in message news: d2a4d36e-26a4-4f7d-ab5a-c1af6d47e7d6...
    > On the taskbar, or on a toolbar?
    >
    > --
    > ..
    > --
    > "JimmyD40" wrote in message news: 03d858e2-9afb-42e0-b7c8-cb4916533de6...
    > Elements of desktop icon began appearing in the toolbar {(Articles 4 et 5).} If I have
    These elements of the taskbar and remove it, it is deleted
    > of
    > both the taskbar and the desktop. Another element of the office appears on the
    > taskbar. The desktop and the taskbar are somehow. This just started
    > ay.
    >
    >

  • If I built a playlist can I delete songs in the music list without deleting the playlist

    I downloaded an album and had to rearrange songs about it.  I made a playlist and put everything in the right order.  I am now able to remove the songs in the list of music that aren't in the right order

    If 'list of music' is your iTunes music library.  The playlist is simply a list of songs that are in your iTunes music library, you have chosen and placed in a desired order.  A song on the playlist cannot exist here if it is not in your library iTunes music.  If you delete a song on the playlist of your music library, it disappears from your playlist.

  • Deleted items of the project, but still on display on the timeline

    While archiving of a project in CS5.5, I first clicked "delete unused ' to cut down on the weight of the dead. Curiously, it removed ALL my clips of images. Even more strange is the fact that nothing shows as "offline". The timeline still plays with all the elements that were in it. When I select a clip in the timeline panel and click on "Reveal in project", it can not because there is absolutely no video footage in the project window. There are no views either, for the whole timeline has a red bar, and selection to "Remove files restore" is not yet available because it has not noticed.

    I went ahead and did a "collect files and copy to the new location. The sequences are intact with clips showing, but there is absolutely no clips of AVI (Cineform) in the folder 'copied '.

    If I is not support for a component in the Assembly and rename it, I start over body and clip shows offline. So there is still a reference media, even without a clip to make it in the project window. And no, the part of my project is not filtered.

    The problem would be a specific problem of the project if you are not able to replicate on a new project.

    Just the file of the project which has been corrupted.

    Certainly not a bug in the product!

  • is it possible to change the blue color for the selected items in the selection list?

    is it possible to change the blue color of the selected items in a list select multi?

    Hello

    I don't think there are beacons of style that would allow you to change the colors highlighted. As you say it is determined by the operating system settings.

    You could look here, it can give you assistance.

    http://www.hedgerwow.com/360/DHTML/ui_input_listbox/demo.php

    Concerning

    Paul

    Published by: pjturley on June 29, 2009 14:53

  • How to remove items from the recent list?

    Hi Garry,

    List of recent is not the actual location of the file, it shows only the names of files that have been recently seen Local disk space and cloud Document, but you can clear the list by clicking on the option clear recent files at the bottom of the page. Please refer to the screenshot.

    Let me know if you have additional queries of Ant.

    Kind regards

    Nicos

  • Deleting items in the resource profile

    Hello

    I had a misconfigured adapter AD test provisioning users, and now the resource names are stuck in a permanent status of "Provisioning". Inside, all tasks "cancelled." Can I do something to remove resources 'AD User"profile of the user of resources bad?

    Thank you very much
    Alex

    This is an extract from the document:

    You can use the archive utility task to archive the following types of tasks:
    -Commissioning of the tasks for instances of resources that have been revoked for disabled or deleted users
    -Tasks of provisioning for instances of resources that have been revoked
    -Approval tasks with a State of the application of the full application, request cancelled or subject approval complete

    So it should work in this case as well.

    Thank you

    Sunny

  • Delete items in the password bar.

    I want to remove the "password is your username" below the password to get into my computor.

    This statement betrays my password

    Help, please

    To remove your indication of password:

    1. click the button start (bottom left of the screen).

    2. click on the image of the user (in the top right menu that opens).

    3. click on 'change your password '.

    4. type your current password in all of the boxes except the last. The last box, 'Index of password' must beleft empty. Click on "Change password" at the bottom right.

    You should now have no index of password in the user login screen.

    Who should fix it

    Rifdhan

    Note: If it works, click on "Mark as answer" below!

  • Windows Live Movie Maker 2011 - how to remove items from the recent projects list

    Windows Live Movie Maker 2011

    I have duplicates on my list of recent projects.

    How to remove items from the numbered list of recent projects?  What are the (thumb)

    bugs used for?  Thank you.

    Hello

    The question you have posted is related to Windows Live Movie Maker and would be better suited in the Windows Live Solution Center. Please visit the link below to find a community that will provide the best support.

    http://www.windowslivehelp.com/product.aspx?ProductID=5

    Amrita M

    Microsoft Answers Support Engineer

Maybe you are looking for