Hi Anuj,

Your code works fine here. Over 100 tries, double-clicking at various rates, traced every time other than when I was intentionally so slow that it shouldn't have registered as a double-click. It also traced reliably using a programmable "double-click" mouse button.

hth,
Bob

anuj sharma wrote:
Hi All
I am just trying to implement double click mouse event on a simple button
and it is working inconsistently. I need to double click on the button and
need consistent results. Attached is my code .You can copy and paste the
attached code to see the inconsistent behavior. Sometimes double click works
and sometimes I have to double click so many times to make it
work.Pleasehelp me out and let me know if I am missing something.
Thanks a lot.
Regards,
Anuj

/********************Code*******************
import fl.controls.Button;
//stage.addEventListener(F
var test:Button=new Button();
test.x=100;
test.y=100;
addChild(test);
//test.dispatchEvent(event:MouseEvent);
test.doubleClickEnabled=true;
test.addEventListener(MouseEvent.DOUBLE_CLICK,aa,true);
test.addEventListener(MouseEvent.DOUBLE_CLICK,aa,false);
function aa(event:MouseEvent):void
{
    trace("Double Clicked");

}
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--
Thanks,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bob Leisle Headsprout Software & Engineering
http://www.headsprout.com
Where kids learn to read!
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to