Hi Guys

Been wracking my brains over this and still can't get it to work. 
How do I get my app to tell the difference between a click and a 
double click event:-

I've seen some similar issues on this group but I couldn't find the 
definitive answer:


Here's the code I've been using:-


import flash.events.MouseEvent;
                import mx.controls.Alert;
        private function initApp():void{
                
        
        
        this.addEventListener(MouseEvent.MOUSE_WHEEL,mw,false,2);
        this.addEventListener(MouseEvent.DOUBLE_CLICK,dc,false,3);
        
        this.addEventListener(MouseEvent.CLICK,lc,false,1)
        
                
                
        }       
        
        private function lc(evt:MouseEvent):void{
                
                var x:Number = Number(evt.localX);
                var y:Number = Number(evt.localY);
                
                Alert.show("Center @ " + " " + x.toString() + " " + 
y.toString());  
                
                
                
                
                
                
        }
        
        private function dc(evt:MouseEvent):void{
                
                var x:Number = Number(evt.localX);
                var y:Number = Number(evt.localY);
                
                Alert.show("Zoom In & Center @ " + " " + x.toString
() + " " + y.toString());       
                
                
                
                
                
                
        }       
                
        private function mw(evt:MouseEvent):void{
                var i:Number = Number(evt.delta);
                var x:Number = Number(evt.localX);
                var y:Number = Number(evt.localY);
                if(i>0){
                Alert.show("FWD" + " " + x.toString() + " " + 
y.toString());  
                }
                if(i<0){
                Alert.show("BWD" + " " + x.toString() + " " + 
y.toString());  
                }
                
                
        }       


Kind Regards


Jonathan

Reply via email to