User Tag List

Results 1 to 6 of 6

Thread: Drag & Drop of an Object...

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Location
    Canberra, Australia
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Drag & Drop of an Object...

    Hi everyone!

    I want to know if how I created a simple drag and drop is right or not. Well, it works, but I'd prefer to not have the item click to the _X,_Y position of the mouse, rather it just be picked up as is and be moved... if you know what I mean. Is there another way? Hope this screenshot works:

    []http://i5.photobucket.com/albums/y191/lc6/annie/ScreenShot_008.jpg[/]

    ?!!

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Canberra, Australia
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Drag & Drop of an Object...

    Hi everyone!

    I want to know if how I created a simple drag and drop is right or not. Well, it works, but I'd prefer to not have the item click to the _X,_Y position of the mouse, rather it just be picked up as is and be moved... if you know what I mean. Is there another way? Hope this screenshot works:

    []http://i5.photobucket.com/albums/y191/lc6/annie/ScreenShot_008.jpg[/]

    ?!!

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperiOS Export ModuleMac Export ModuleSWF Export ModuleUnicode Add-on
    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)
    JasonDarby's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    4,938
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Drag & Drop of an Object...

    Hopefully ive understood correctly (sorry its too early in the morning for me to figure out the code <img src="/center/images/graemlins/smile.gif" alt="" /> ) I would recommend looking at Sarah's excellent Jigsaw puzzle examples on the link below, as they show hoe to click on an item once, make them move with the mouse, and then drop when they are over an exact place (using a single mouse click).

    http://www.clickteam.info/kb/start/i...?showtopic=184

    Hope that helps.

    Jason

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperiOS Export ModuleMac Export ModuleSWF Export ModuleUnicode Add-on
    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)
    JasonDarby's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    4,938
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Drag & Drop of an Object...

    Hopefully ive understood correctly (sorry its too early in the morning for me to figure out the code <img src="/center/images/graemlins/smile.gif" alt="" /> ) I would recommend looking at Sarah's excellent Jigsaw puzzle examples on the link below, as they show hoe to click on an item once, make them move with the mouse, and then drop when they are over an exact place (using a single mouse click).

    http://www.clickteam.info/kb/start/i...?showtopic=184

    Hope that helps.

    Jason

  5. #5
    No Products Registered

    Join Date
    Jun 2006
    Location
    Plymouth, UK
    Posts
    211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag & Drop of an Object...

    I find it's best to toggle the object's flag when it's clicked on (you'll need a new event to detect this) or dropped and check for the flag being on in your Repeat while pressed event.

    Otherwise if you have more than one object of the same type, you will pick them up too if you drag the first object over them. Kinda like picking up magnets.

    As for the X and Y snapping to the mouse position, try setting two of the object's alterable values to the difference in X between the mouse and the object and the difference in Y between the mouse and the object. Then simply replace your Set X("Gift") to XMouse to Set X("Gift") to XMouse + Alterable Value A("Gift"). and the same for Y with Alterable Value B.

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Location
    Plymouth, UK
    Posts
    211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag & Drop of an Object...

    I find it's best to toggle the object's flag when it's clicked on (you'll need a new event to detect this) or dropped and check for the flag being on in your Repeat while pressed event.

    Otherwise if you have more than one object of the same type, you will pick them up too if you drag the first object over them. Kinda like picking up magnets.

    As for the X and Y snapping to the mouse position, try setting two of the object's alterable values to the difference in X between the mouse and the object and the difference in Y between the mouse and the object. Then simply replace your Set X("Gift") to XMouse to Set X("Gift") to XMouse + Alterable Value A("Gift"). and the same for Y with Alterable Value B.

Similar Threads

  1. Beta 15, Testing backdrop object, active object and drag and drop movement
    By Fernando in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 9th February 2012, 11:57 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 / layer object bug
    By life2searching in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 11th April 2011, 09:23 PM
  4. How do I drag and drop a bouncing ball object?
    By Aloan in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 13th March 2011, 04:52 PM
  5. Idea Extension : Drag/Drop Object
    By Nico in forum Extension Development
    Replies: 1
    Last Post: 21st November 2006, 11:18 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
  •