/ Published in: ActionScript 3
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
var self:DisplayObject = this;
this.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void{
if(event.target == self){
self.startDrag();
self.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void{
self.removeEventListener(MouseEvent.MOUSE_UP, arguments.callee);
self.stopDrag();
});
}
});
Comments
 Subscribe to comments
                    Subscribe to comments
                
                