A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Drag and Drop

  1. #1
    Junior Member
    Join Date
    Jan 2001
    I have a drag and drop exercise I am working with and I was wondering how I can set a submit button that will check whether or not items are dragged to the correct place and possibly yield some calculations (scores) from this. I know this require some intense scripting. Is there anyone out there that can help?

  2. #2
    Senior Member
    Join Date
    Aug 2000
    with conditionals you could check that yes.. if the clip is dropped at the right place (give coords or use hitTest) then a variable is set to true. Now if that variable is true your submit button could display a message in a dynamic textfield.
    here's an example with a clip instancenamed object1 that will be dragged and hopefully dropped in another clip instancenamed box:
    on (release) {
    	if (_root.object1.hitTest(_root.box )) {
    		_root.result = "object1 is at the right place";
    	} else {
    		_root.result = "object1 is misplaced";}}
    [Edited by gparis on 08-03-2001 at 09:35 PM]

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