Welcome, Guest
  • Author Topic: List-Component does not fetch change event  (Read 2544 times)

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    List-Component does not fetch change event
    « on: 01/22/07, 08:11 »
    I have a Listbox, where I assign attributes dynamicly.
    Everything works quite well, but the assignment of a eventhandler for the change event (other, less usefull, work this way)

    her is my code
    Code: [Select]
    l1.dataProvider=liste;
    l1.selectedItem.onChange=ausgabe;
    l1.vScrollPolicy="auto";
    l1.backgroundColor=0x666666;
    l1._alpha=50;
    function ausgabe(){
    getURL(l1.selectedItem.data);
    }

    If I put the list component on stage, and insert the event into the components script, it works - but it needs to be dynamic.
    Maybe it needs to be written differently - but I tried many versions.
    I NEED A HINT ???
    happy flashing
    8)
    Ronald

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: List-Component does not fetch change event
    « Reply #1 on: 01/22/07, 08:50 »
    This works:
    Code: [Select]
    l1.addEventListener("change",ausgabe);
    happy flashing
    8)
    Ronald