|
The click/doubleClick behavior is generally
considered “correct” as it’s the same as Windows behavior.
If you want to know if only a click occurred you should store a variable and use
a timer, when the timer fires check to see if doubleClick had fired and if not
then execute on your click. Doesn’t have to be a long timer but long
enough that another click would be considered a regular click. doubleClick on the label may be a known bug. Matt From: Hello List; I have a couple questions/problems with double click events.
Here’s the application I’m using to test click
and double click events: <?xml version="1.0"
encoding="utf-8"?> <mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*"
layout="absolute"
doubleClickEnabled="true"
creationComplete="OnCreationComplete()">
<mx:Script>
<![CDATA[
private function OnCreationComplete() : void
{
trace( "Label doubleClickEnabled:", l1.doubleClickEnabled );
trace( "Button doubleClickEnabled:", b1.doubleClickEnabled );
}
]]>
</mx:Script>
<mx:HBox>
<mx:Label id="l1"
text="ClickMe"
doubleClickEnabled="true"
click="trace( 'Label Click' )"
doubleClick="trace( 'Label DoubleClick' )"/>
<mx:Button id="b1"
label="ClickMe"
doubleClickEnabled="true"
click="trace( 'Button Click' )"
doubleClick="trace( 'Button DoubleClick' )"/>
</mx:HBox> </mx:Application> Creo Inc., a subsidiary of Kodak Tobias Patton | Software Developer | Tel: +1.604.451.2700
ext: 5148 | mailto:[EMAIL PROTECTED] | http://www.creo.com
|

