PDA

View Full Version : Double_click?



Huinoio
June 2nd, 2007, 11:18 AM
I'm trying to use the mouse event DOUBLE_CLICK but it doesn't seem to work.
the code I'm using is:

addEventListener(MouseEvent.DOUBLE_CLICK,doublecli ck);

protected function doubleclick(e:MouseEvent):void {
trace("doubleclick");
}

this is targeted at a MovieClip. I don't have trouble with the other mouse events, only double click.

senocular
June 2nd, 2007, 11:28 AM
http://livedocs.adobe.com/flex/201/langref/flash/display/InteractiveObject.html#doubleClickEnabled

Huinoio
June 2nd, 2007, 11:57 AM
Excellent, Thank-you.

joshchernoff
July 31st, 2007, 08:12 PM
so that mean you have to do a



sprite.addEventListener(MouseEvent.DOUBLE_CLICK,do ublecli ck);
sprite.doubleClickEnabled = true;

protected function doubleclick(e:MouseEvent):void {
trace("doubleclick");
}
what am I "doubleClickEnabled = true" on?


Edit:: found it. I needed to doubleClickEnabled at the bottom most nested child as my spite had a spite had a spite in that spite.