-
Hi.
I have seen many tutorials and open source movies on drag and drop. My problrm is that none of them seem to have a visual indication that if you release 'now' that a specific event will be triggered.
I have created a skeleton of the human body. A list of bone names on the right hand side of the skeleton can be dragged onto the skeleton, and when dropped over the correct place, they disappear and the bone changes colour. Because the bones are so complex, i need a highlight to appear when the user is over each bone so that they can be sure of what bone they are hovering over.
The drop traget works fine - and the correct things ahappenon mouse relase, but I have been unable to get the hover/highlight to work on the drag-over event.
Please help.
I am looking for a tutorial, open sourfce movie, or even just advice on how to achieve this!
-
hi gtgibson,
if the bones are different clips, you could use the hitTest method. As in
Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root.bone)) {
_root.bone.gotoAndStop("highlight");
} else {
_root.bone.gotoAndStop(1)}}
This code is on the dragged movieclip.
hope this helps
gparis
-
hi gtgibson,
if the bones are different clips, you could use the hitTest method. As in
Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root.bone)) {
_root.bone.gotoAndStop("highlight");
} else {
_root.bone.gotoAndStop(1)}}
This code is on the dragged movieclip.
hope this helps
gparis
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
|