|
-
Drag and Drop Hit-test
Hi.
Does anyone know a great technique to implement drag-and-drop, with a hit test during hover time, that doesn't require many resources, and is extremely generalized?
I'll explain what I am trying to do. I'll write the code, but I'm wondering if there are going to be some pitfalls once I get started, and thought maybe I'd get a little advice first.
Basically, I want to be able to have different types of draggable movie-clips, and when I drag them onto each other, and I want that to effect the way that they relate to one another.
There could be any number of different types of objects (that stem from a movie-clip).
Any one could be dragged-and-dropped onto another and that would affect them both. When one object is dragged over another, the target object should glow, and when it is dragged out, the former target should cease to glow. When it is dropped, the dragged object becomes an aspect of the target.
What I'm wondering is if there is an event-driven way of doing this, similar to onRollOver/onRollOut, rather than a more processor-consuming recursive hit-test. So the only time anything is invoked, something needs to happen, rather than running some kind of cycle that checks to see if something needs to happen every time.
Does this make sense?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|