A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: drag and _droptarget highlighting ---- help

  1. #1
    Senior Member
    Join Date
    Apr 2000
    Location
    New Zealand
    Posts
    100
    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!

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    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

  3. #3
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center