4 Replies Latest reply on Dec 15, 2010 1:44 PM by JoGlez

    add eventlistener for doubleclick AND down together..

    JoGlez

      Hi, I am using code from "Tour de flex" which are basically drag tiles. For examble if you keep your mouse down on one of them then you can drag the object around and reorder the existing ones... What I would like to do is to start the "reorder" only if the mouse is still down after a double click.... How can I make this possible...??

       

      existing eventlisteners are ;

       

                addEventListener(MouseEvent.MOUSE_DOWN,startReorder);
                  addEventListener(DragEvent.DRAG_ENTER,dragEnter);
                  addEventListener(DragEvent.DRAG_OVER,dragOver);
                  addEventListener(DragEvent.DRAG_EXIT,dragOut);
                  addEventListener(DragEvent.DRAG_DROP,dragDrop);
                  addEventListener(DragEvent.DRAG_COMPLETE,dragComplete);

       

      I would like to add something like... addEventListener(MouseEvent.DoubleClick,isdown)

       

      isdown{

      validate if mouse is still down

      True: continue with drag effect

      false: do nothing"

       

      Why all of this... If the "reorder" of the objects initialize once you click on something than you can't interact with the objects,  I would only like to reorder after the doubleclik + down to ensure that a user can interact with the objects..

       

      http://demo.quietlyscheming.com/DragTile/TeamMgr.html <---sample application, NOTICE HOW CLUMBSY IT IS TO MOVE THE SCROLLBAR IN THE DRAG TILE