Adding data to list trouble a TextArea.

Hello

I loaded xml data in a tile list and added the event listener to capture clicks. When I click on an item in the TileList component, I intend to add the label of the element in a TextArea. All right. Yet the problem is label element is being updated instead of added to the text box. I hope it can be fixed. Any help would be appreciated.

Thank you

Kristtee

-Here is the code and xml.

<? XML version = "1.0" encoding = "UTF-8"? >

< lib >

"< name of itm ="a"sos =" images/1.png "/ >

"< name of itm ="two"sos =" images/2.png "/ >

"< name of itm ="three"sos =" images/3.png "/ >

"< name of itm ="four"sos =" images/4.png "/ >

"< name of itm ="five"sos =" images/5.png "/ >

< / lib >

AS3 code

-----------

import flash.net.URLLoader;

import flash.events.Event;

import flash.net.URLRequest;

var xmlData:XML;

var path: String = "tlData.xml";

var loader: URLLoader = new URLLoader();

loader.addEventListener (Event.COMPLETE, dataLoaded);

Loader.Load (new URLRequest (path));

function dataLoaded(e:Event):void {}

System.disposeXML (xmlData);

xmlData = new XML (e.target.data);

for (var i: int = 0; i < xmlData.itm.length (); i ++) {}

trace (XMLDATA. ITM[i].@name);

myTL.addItem ({label: xmlData.itm [i]. @name, source:xmlData.itm[i].@sos});})

}

myTL.addEventListener (Event.CHANGE, ecHandler);

myTL.selectedIndex = 0;

}

function ecHandler(event:Event):void {}

trace (myTL.SelectedItem.Label);

myTa.text = myTL.selectedItem.label;

}

It isnot clear for me what you mean when you say that the label of the element gets updated, rather than added to the text box.  Based on the code, show you the text TExtArea will be re-assigned some new value in the label is selected.

If you want to add the text so that each label adds to the other, then try to use the appendText() method...

myTa.appendText (myTL.selectedItem.label);

You may or may not want to add a line ('\n') as well as return.

Tags: Adobe Animate

Similar Questions

  • new set of camera with v4 profiles added to the list of options in camera of calibration

    Hello!

    I'm shooting with a Nikon D300s and I was using 8 elements and Camera Raw 5.5 (included in item 8) to process my photos for two years now. Since today, when in Camera raw, I now see a new set of camera with v4 profiles added to the list options in camera of calibration. As for example "camera D2X Mode 1 v4, v4 of landscape of the camera, camera neutral v4 etc...) From whence they came (they weren't there the last time about 2 days ago, I opened elements) and how are they different? They just increase the list and disturb my work flow.

    Is there a setting that has been changed? But I do not remember making any change. It me indeed puzzle.

    Thanks for the help

    These would have been added by an update to plug in Camera Raw. Each is an alternate interpretation of the raw data. We get these profiles of the manufacturer, then it means that put Nikon to update their profiles and we distribute them. Probably, you wouldn't be able to seems not much difference between the older version and the new version of the profile.

    These profiles are just files on the computer, and if you really just want to do the cleaning in the list, you can remove the extra copies. They are stored here:

    Windows XP: C:\Documents and Settings\All Users\Application Data\Adobe\CameraRaw\CameraProfiles\Camera\Nikon D300S

    Win Vista/7: C:\Program Data\Adobe\CameraRaw\CameraProfiles\Camera\Nikon D300S

    Macintosh: HD/Library/Application Support / Adobe / Camera Raw / CameraProfiles / photo/Nikon D300S camera

    I recommend keep v4 files, because these are the latest versions.

  • How to make a music CD is inserted, added to the list of Windows Media Player library?

    Windows media player

    How to make a music CD is inserted added to my list of Media Player library? No installation of 'Add' seems to be available.

    How to make a music CD is inserted added to my list of Media Player library? No installation of 'Add' seems to be available.

    It is called 'rip '.

    Insert the CD > when Windows Media Player starts to play, click on Rip to the toolbar > music CD menu appears > check mark to one you want > bottom right, click Start Rip

    Once completed, check another > click Rip > and so on... For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • How to avoid the visual studio project to be added to the list of recent but still get solutions

    When adding projects to a solution in visual studio, the project also gets added recent projects and Solutions list

    How ever I never open the project in the recent list so, indeed, it's cluttering up the list of these latest solutions so I would avoid getting projects added to the list of these last, but couldn't find a way to do

    Edit:

    Proposed by question to:

    https://social.msdn.Microsoft.com/forums/en-us/3bb8a2d5-c1ab-4b12-B0E9-5ceb1f317a3f/how-to-avoid-Visual-Studio-project-to-be-Adde-to-recent-list-but-still-get-solutions?Forum=VSSetup

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • Adding data to the ESX host store

    Hi all

    We are automating the process of adding data to the esx host store. We have all the necessary inputs as a host, Cluster, data center, data store name, store (VMFS) Pat data.

    Do we have the cmdlets to get the result? What is the data store should be added after the configuration of the network?

    We need confirm that the data store must be there in vcenter/Cluster?

    Please help explain the process.

    Thanks and greetings

    Riyas Hussain has

    If the LUNS on which these data warehouses are defined are zoned and correctly configured as a shared, they become automatically visible on the ESXi node.

    Do you see the LUN on different nodes of ESXi under storage adapters?

  • Any idea when GTX 970 will be added to the list in charge in the most recent version of first? ID like my cuda.

    Any idea when GTX 970 will be added to the list in charge in the most recent version of first? ID like my cuda.

    Should work now... for CS5 or 6 there was a hack http://forums.adobe.com/thread/629557

    For later versions, my understanding is that as long as the card has at least 1Gig vram you need, you can use Cuda

  • Lightroom stopped adding date folders to import pictures.

    Lightroom stopped adding date folders to import pictures.  The photos appear and I can put them in collections.  I checked the integrity of the catalog, and no problem.  Can anyone help? I use a Mac.

    If you must move the photos or folders that have already been imported, move them into the Lightroom folder Panel. I wouldn't bother, I would leave them right where they are, but it's me, I use keywords and metadata to find my photos and I don't really like what they are in folders.

    For imports, again, you must select the name of folder/location of appropriate folder in the Lightroom Import dialog box. There are many tutorials on this topic.

  • Adding data to an attribute of the object database

    Well, I have a little problem I am trying to add data to my bpm of a database object, but it does not add the info
    my method is:
    for each item
    SELECT cveAfectacion
    THE COMIC BOOK. ODS_VIEWER. BAN_EVENTOS_CONFIRMACION
    WHERE idSolicitud is contador
    do
    show "dentro do."
    display BAN_EVENTOS_CONFIRMACION.cveAfectacion
    solicitudCliente.tipo = BAN_EVENTOS_CONFIRMACION.cveAfectacion
    end

    Thanks for the help

    See this link: Re: adding data to an attribute of the object database

  • adding categories to list dropdown script

    Hello

    Can't find the easy answer.

    I have a drop down when one of the categories (Limbo) is selected, it erases any other data in the form.  What I want to do now is to add 1 Limbo, Limbo 2, Limbo3... etc. at the drop down and have these categories do the same thing as Limbo.

    Here's a partial script with the kind of Limbo.

    I do not know have added in limbo 1, Limbo2 to the script

    Any help would be great!

    In INITIALIZATION:

    if (this.rawValue == "Limbo")

    {

    for(var i=0; someArray.length; i i<++)

        {

            if (i == 3 || i == 7 || i == 13)

            {

    xfa.resolveNode (untableau [i]+"..") RawValue NAR") = 0;

                for (var j=1;j<8;j++)

                {

    xfa.resolveNode(someArray[i]__+__".rating"__+__j).rawValue = 0;

    xfa.resolveNode(someArray[i]__+__".rating"__+__j).access = 'protected ';

                }

            }else{}

                for (var j=1;j<9;j++)

                {  

                    if (j<8)

                    {

    xfa.resolveNode(someArray[i]__+__".rating"__+__j).rawValue = 0;

    xfa.resolveNode(someArray[i]__+__".rating"__+__j).access = 'protected ';

                    }else{}

    xfa.resolveNode(someArray[i]__+__".ratingNO").rawValue = 0;

    xfa.resolveNode(someArray[i]__+__".ratingNO").access = 'protected ';

                    }  

                }

            }

           

        }

    }

    So Limbo1, Limbo2, etc., are in the drop-down list itself and you want that they do the same thing, then simply add them to fi statement:

    If (this.rawValue == "Limbo" | this.rawValue == "Limbo 1" | this.rawValue == "Limbo 2")

  • password data are listed for a site, but are not used for the connection

    After updating Firefox (for 36.0.1), listed saved passwords were not being inserted to connections site. After you delete all data saved password, there is no prompt to save the entered password data. I then deleted to recycle bin signons.sqlite, logins.json and signons3.txt, you exit Firefox and hard rebooted my desktop Windows 7 Pro 64-bit computer. Still no prompt to save password entered data. Remember passwords for websites has been checked in all of this, with several attempts to uncheck, OKing, close and restart Firefox, box, OKing, restart Firefox, you log in to a site.

    Another problem is the result of the last update. I can't get my homepage to show the startup of Firefox. The box on the general tab in the Options and the home page is entered. I tried to place the home page two ways: either by manually typing the url in the Options and the other by accessing the url and drag the tab to the Home icon and say yes to make this my home page.

    Ideas for resolution of these issues would be appreciated.

    Update:
    Just got the notice of upgrade to version 37.0.2. Installed upgrading and now no problems! Hope this will help others.

    There are several reasons for something like that. But if the browser
    is now working properly, just keep an eye out for the problem to come back.

  • iTunes 12.4 - added Date - 1970

    I just bought an album (today) from iTunes.  It does not appear in my 'New' smart playlist, which is defined to contain all the music added in the last month.

    After you dig around and find the album I bought today in my library, I see that the "Date added" is January 25, 1970.

    It is a problem. Does anyone have any ideas on this?

    The ideas are highly appreciated.

    I have a question too... the same date January 25, 1970. When I went to 'Get Info' I wasn't able to fix the date.

  • Recently added in the list discovered iTunes 12.4

    Hi, I've updated again iTunes 12.4 and I lost the list of recently added music view

    I mean this:

    The screenshot you have included is not iTunes version 12.4.

    Confirm your version by selecting iTunes > about iTunes.

  • adding data to a table

    Hi need help... I need to add the missing data to the table

    YY-year

    MM-month

    DD-Date

    mm-minutes

    SS-seconds

    Mmss0 of 1YYMMDD of data

    20.8. 1090828 05050
    1.2 1090829 10150
    7.2 1090901 08400

    the above table is the data where I need to insert data for data til 090831

    as below

    Mmss0 of 1YYMMDD of data

    20.8. 1090828 05050
    1.2 1090829 10150

    0 1090830 0

    0 1090831 0

    7.2 1090901 08400

    How to do this? and I need to check for each month is there data missing inbetween? Help, please

    Yes.  You need to browse your table.  The index of the current index and index + 1.  Translate the text dates, and use the date functions to determine if a date is missing.  If this isn't the case, increase the index of 1, and repeat.  If a date is missing, insert a row and setting the date of the last date + 1.  Repeat raising your index which should make the line that you just added.

  • In the model group data when list account data then 1 shows in the list field

    I have a Xml file contacts.xml, which is contained below...



    1
    SR Editor.
    Mike
    Chepesky


    In the PRC, I do just code below

    GroupDataModel * model = new GroupDataModel();
    XDA XmlDataAccess;
    QVariant list = xda.load)
    QDir::currentPath() + "/ app/native/assets/contacts.xml."
    (' / contacts/contact ");

    model-> insertList (()) list.value;

    QStringList key;
    key<>
    model-> setSortingKeys (key);
    model-> setSortedAscending (FALSE);

    listView-> setDataModel (model);

    When this XML have more then a refrigerated then given show in the listview, but when a refrigerated data does not show.

    Please help me...

    MOD Edit: Remove information staff to comply with the Community guidelines and the terms and Conditions of use.

    Hi Sumitava_Datta,

    Please report this issue in jira (developer Issue Tracker).

    I confirm this Zmey solution work. I tried it myself and it indeed gives a solution to this bug. Just use isEmpty() instead of isNull(), who is not recognized as a valid QVariantList function.

    QVariant list = xda.load(
    QDir::currentPath() + "/app/native/assets/contacts.xml",
    "/contacts/contact");
    
    QVariantList l = list.value();
    if (l.isEmpty())
      model->insert(list.value());
    else
      model->insertList(list.value());
    
  • Adding custom Contact list fields

    I noticed that the RIM Windows Live Messenger application has been able to add a custom field in the BlackBerry contacts.

    The field name is "Windows Live Messenger".

    I also want to add a field to all the contacts in the contacts list of BB.  However, I can only find API to change the label of the 4 USER fields and add categories.

    I missed the API correctly, or is adding new contact fields can do something only RIM?

    This can be done using the BlackBerry API defined audience.

Maybe you are looking for

  • Change language in Firefox does not work. I have pictures of it.

    I can't change the language to Spanish some time I had. Why?Bar menu is: file edit view history... but when in Spanish: Archivo Editar Ver Historial.And so on with other tools and menus.I have pictures of the two.

  • Satellite 1800-814: where can I order several keyboard?

    I made the mistake to vacuuming my keyboard Satellite 1800-814, a year or two ago. Surprised myself how it was easy to suck the letter "T" immediately! Found again after having dustily through the residue of "cyclone" Dyson and he re-joint - after a

  • Channel indicator vertical scrollbar BUG?

    Hello So, I came across this "bug" not so long ago. Normally, when select the scroll bar on any string indicator in labview, and then up and down, the text moves accordingly. However, when you use the wheel to scroll and the channel indicator is not

  • share point

    Hello can anyone suggest me how I can get sharepoint virtual machine for developers as well as i can practice in My clean PC

  • Missing Captain obvious - Site to site IPSEC, any ISAKMP security association

    So I try to set up a site to IPsec and I fell at the first hurdle. I checked my config so many times and I can't see a problem. Two routers can ping each other so connectivity is there. Two routers have static routes to the router's local ip range ag