Drag and drop help
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Drag and drop help

  1. #1
    Junior Member
    Join Date
    Jul 2005
    Posts
    8

    Drag and drop help

    In the following AS3 code snippet, I am trying to get to the second frame if the drag object (call_draggable)
    lands on the target (drag_target).


    stop();
    /* Drag and Drop
    Makes the specified symbol instance moveable with drag and drop.
    */

    call_draggable.addEventListener(MouseEvent.MOUSE_D OWN, fl_ClickToDrag_2);

    function fl_ClickToDrag_2(event:MouseEvent):void
    {
    call_draggable.startDrag();

    }

    stage.addEventListener(MouseEvent.MOUSE_UP, fl_ReleaseToDrop_2);

    function fl_ReleaseToDrop_2(event:MouseEvent):void
    {
    call_draggable.stopDrag();
    if (call_draggable == drag_target) {
    gotoAndStop(2);
    }
    }

    Can someone help me? Or at least point out what I am doing wrong?

    Thanks!

  2. #2
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    677
    If you are
    Quote Originally Posted by kcortesi View Post
    trying to get to the second frame if the drag object (call_draggable)
    lands on the target (drag_target)
    this condition
    if (call_draggable == drag_target) {
    will be always false

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

Poll by Flashkit.com