Posted By

arpit on 11/01/09


Tagged


Versions (?)

Make a window target


 / Published in: ActionScript 3
 

  1. var self:DisplayObject = this;
  2. this.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void{
  3. if(event.target == self){
  4. self.startDrag();
  5. self.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void{
  6. self.removeEventListener(MouseEvent.MOUSE_UP, arguments.callee);
  7. self.stopDrag();
  8. });
  9. }
  10. });

Report this snippet  

You need to login to post a comment.