0 Replies Latest reply: Feb 18, 2011 3:36 AM by taravasya RSS

    One more addEventListener issue

    taravasya Community Member

      Hello. I'm trying to circumvent the restriction of addEventListener, while working with FlashPlayer on panel AE.
      To do this, I created a TreeView, and was hoping to use it with addEventListener.
      And you know what I found? If I use the mouse events:

      mytree.addEventListener('click', myOnDoubleClick);    
      
      myOnDoubleClick = function(e)
          {
              if(e.detail ==  2)
              {
                  alert(mytree.selection.text);    
              }
          }
      

      its don`t work too! In debug i see what function is activated, but e.detail always equal to zero.

      So, as I undedrstand, AE know what is it - mouse event Click, but don`t know nothing about single click or double click cases of this events.

      I`m right? If so, it must be added to "BugReports"

      And more!!!

      Even if I ignore different between single click and double click:

       

      mytree.addEventListener('click', myOnClick);
      myOnClick = function    
      
              {
                  alert(mytree.selection.text);    
              }
      

      You know what exactly I see in alert box?

      Not selected item text, but mytree.treview(or somethig like this). So...

      Even if AE will be correctly recognize the doubleclick, I`ll steel don`t get needed results. Because AE don`t recognize TreeView items...

      Ofcause, I can use integrated OnChange event, but what if I need to use both events(single click and double click) in the different ways?..

      Thank You.