Jump to content


Dragging An Object Outside Another


1 reply to this topic

#1 Mattbkr

    New Member

  • New Members
  • Pip
  • 4 posts

Posted 25 June 2012 - 02:13 AM

Hey,

I'm facing a problem with drag and drop event handling. Basically in my movie, there are two objects; a circle that's mostly covered by a rectangle. I want to drag the circle out such that it'll be completely outside the rectangle, but while I'm dragging it out and when the circle is outside the rectangle, I want the circle to be sent to the front such that if I continue dragging it over the rectangle again, the circle will be over the rectangle this time.

For the circle, I've written:

onSelfEvent (press) {

startDragUnlocked();
}

onSelfEvent (release) {
stopDrag();
}

onSelfEvent (dragOut) {
this.swapDepths(getNextHighestDepth());
}

I'm not sure about the dragOut script, please help.

#2 Wolf Gross

    Advanced Member

  • Moderator
  • PipPipPip
  • 23919 posts
  • Gender:Male
  • Location:Perth/Australia

Posted 25 June 2012 - 10:21 AM

...can you post the editing file ".swi" here.

wolf
Posted Image
Web Wolf Wonder Web Works

SWiSHsites modified





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users