A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: drag and drop help!

  1. #1
    Senior Member ilive's Avatar
    Join Date
    Aug 2006
    Location
    Philippines
    Posts
    195

    drag and drop help!

    hi guys! can you please help me in the code? i found a tutorial about drag and drop animation, i just want to know if there is a way if for example you have the objects drop in dropzone1 and you drag another object in the same dropzone the object wont be place on the top of the first object. I've attached my sample .fla so that you can take a look about my problem. Thanks in advance!
    Attached Files Attached Files

  2. #2
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,930
    What do you want to have happen? Do you want the original object to move back to its original position, or do you want the dropped object to go back to its original position? Either one is do-able.
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  3. #3
    Senior Member ilive's Avatar
    Join Date
    Aug 2006
    Location
    Philippines
    Posts
    195
    Quote Originally Posted by flashpipe1
    What do you want to have happen? Do you want the original object to move back to its original position, or do you want the dropped object to go back to its original position? Either one is do-able.
    hi flashpipe1! I want the dropped object to go back to its original position. But I didn't know how to code it, can you help me in the code? Please? Thanks in advance!

  4. #4
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,930
    That's a fairly difficult way to handle drag and drop. It looks like you've repeated each script in all its possible options for every draggable item. You may want to take a look at another drag and drop example that also has the "put back" function you're looking for if a target is already filled.

    http://www.tutorialized.com/view/tut...get-Areas/3061

    Basically, you'll want to test the target area when an item is dropped to see if it's already filled, and, if it is, put the dragged item back...

    Hope that helps!
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  5. #5
    Senior Member ilive's Avatar
    Join Date
    Aug 2006
    Location
    Philippines
    Posts
    195
    thanks flashpipe1! it really helps me a lot!

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