A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Drag and Drop

  1. #1
    Member
    Join Date
    Apr 2001
    Location
    Cape Town
    Posts
    99

    Drag and Drop

    Hi, I am sure this should be easy. I have 4 drag objects and 4 drop targets. It is a simple 1 to 1 option. All works fine except when I happen to drop an dragObject onto another.

    As you can see in my code I am able to trace the droptaget. I get the following output:

    When dropped on droptarget: [Object targetBox]
    When dropped on dragObject: [Object drag]

    This is correct according to my library linkage.
    My question is however how do I write an if statement to make use of this?

    function MystopDrag(e:MouseEvent):void {
    trace(e.currentTarget.dropTarget.parent)
    if(e.currentTarget.dropTarget.parent==drag){
    trace("TEXT")
    }

    }

  2. #2
    Senior Member
    Join Date
    Jul 2008
    Posts
    391
    Can you explain the question some more? I don't understand what is being asked.

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