A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] setChildIndex question- i know there's a simple solution i'm not seeing

Threaded View

  1. #4
    Member
    Join Date
    Mar 2009
    Posts
    55
    This is an extract of my code: (The attached fla works as well)

    PHP Code:
    // These items will get the drag functionality
    addDrag(box);

    private function 
    addDrag($mc:MovieClip):void
    {
        
    $mc.addEventListener(MouseEvent.MOUSE_DOWNdoDrag);
        
    $mc.addEventListener(MouseEvent.MOUSE_UPkillDrag);
    }

    private function 
    doDrag(e:MouseEvent):void
    {
        var 
    dragger e.currentTarget;
            
    dragger.startDrag(true);
        
    this.setChildIndex(dragger, (this.numChildren 1));
    }
    private function 
    killDrag(event:MouseEvent):void
    {
        var 
    dragger e.currentTarget;
           
    dragger.stopDrag();

    Attached Files Attached Files
    Last edited by Mpjraaij; 07-01-2009 at 03:07 PM. Reason: Attached file

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center