User Tag List

Results 1 to 9 of 9

Thread: How to create drag and drop ??

  1. #1
    No Products Registered

    Join Date
    Nov 2008
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to create drag and drop ??

    Hello Again:

    I would like to drag and drop an object. That is, left mouse button down-->drag. Left mouse button up-->drop. Not sure how to accomplish this with the mouse click event.

    I would like the object to drop in a specific area or on a specific place. Like match two similar pictures by dragging one on top of the other.

    Are there any examples of drag and drop? I've search the forum and looked at a few tutorials but maybe I'm not referring to this event-action properly.

    Thanks for your help.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to create drag and drop ??

    My Drag Object was made just for this.

    EDIT: I guess you can't use extensions. Here is what to do:

    When the object is clicked set an internal flag on. If this flag is on, set the object's position to XMouse, YMouse. When the mouse is released (Negated "Repeat While Mouse is Pressed"), set the flag off.

  3. #3
    No Products Registered

    Join Date
    Nov 2008
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to create drag and drop ??

    Hi Jaffob:

    Thanks. I think that I need some more help with this concept. When you say "flag", do you mean to make an object variable and set it to "1" when the mouse is clicked?

    Then make a negate event and set the object variable to 0?

    I'm just not getting it. Sorry.

  4. #4
    No Products Registered

    Join Date
    Nov 2008
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to create drag and drop ??

    Hmm,

    Is there anyone who can tell me how to make a drag and drop event with TGF?

    TIA

  5. #5
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: How to create drag and drop ??

    User Clicks with Left Button on Active
    Active: Set Flag 0 On

    Active Internal Flag 0 is On
    Active: Set X Postion to X Mouse
    Set Y Position to Y Mouse

    (Negate)Repeat While Left Mouse Key is Pressed
    Active: Set Flag 0 Off
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  6. #6
    No Products Registered

    Join Date
    Nov 2008
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to create drag and drop ??

    nivram:

    I want to thank you for taking the time to help me. Your instructions were a bit challenging, but as I worked through the software, I was able to (finally) create a drag n drop. THANK YOU.
    I've been trying to figure this out for days. I worried that my demo time would run out before I even got a simple thing done. Whew! :-)

  7. #7
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: How to create drag and drop ??

    Your welcome.
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  8. #8
    No Products Registered

    Join Date
    Dec 2008
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to create drag and drop ??

    this explanation really helped me as well!

    but what if you want to click to pick up an object and have it follow the mouse. then click again to drop it off at a certain position. the problem here is that MMF reads the object as being clicked and set to mouse position again.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: How to create drag and drop ??

    To do that you can toggle the object's flag. That will automatically set the flag off if it is on, or on if it off.

    Do the same events as nivram had, but change 'set flag' to 'toggle flag'

    You woudn't need the last event either.

Similar Threads

  1. Drag and drop movement- force drop action
    By qenio in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 7th April 2013, 09:53 PM
  2. Drag & drop without drag & drop object.
    By soloman in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 20th August 2011, 02:45 AM
  3. Drag and Drop
    By Patrice in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 18th May 2011, 02:18 PM
  4. Drag & Drop Example
    By Stephen in forum File Archive
    Replies: 5
    Last Post: 13th August 2009, 03:08 AM
  5. Drag and drop
    By pl in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 5th August 2006, 01:44 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
  •