User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Drag capabilities in mf2?

  1. #1
    No Products Registered

    Join Date
    Jan 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Drag capabilities in mf2?

    Hello,
    Appreciate some beginner info on mf2
    I want to emulate an iPhone game using mf2 - Are there any Drag capabilities in mf2?
    For example: moving a plane from one side of the screen to the other/ Grabbing a box and placing it somewhere else on the screen.
    Drag action needed:
    a. I’d like to be able to click on it and start dragging it and releasing in a different location.
    b. As long as I keep pressing my left mouse button, the object moves as I direct it.
    If you could please refer me to a tutorial on the subject, that’d be great :-).
    Thanks.

  2. #2
    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,937
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Drag capabilities in mf2?

    Yes, there is a drag and drop movement property. Click on an object and select "movement tab" and then in the movement drop down box select drag and drop..

  3. #3
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag capabilities in mf2?

    When was this added? I don't have it and I've never heard of it.

  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,937
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Drag capabilities in mf2?

    Well i am running Dev build 249, but i cannot recall where i got it from, but i think it was in the patches.

  5. #5
    No Products Registered

    Join Date
    Jan 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag capabilities in mf2?

    So it's not supported in the demo, right?too bad. Grabbing objects is a basic action in games.
    Is there an example where I can see how it actually works? or another way to implement this?

    Off topic:
    I'm trying the platform movement and the active object just doesn't jump. would you by any chance have an idea why? :-)
    I am following this tutorial: http://www.atomicstud.com/node/71

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag capabilities in mf2?

    Dragging an object is just setting it's position to the mouse position while mouse button is pressed... It shouldn't be too hard. Do something like :
    User pressed mouse button over Object : set object's flag 0 on

    On flag 0 on + repeat while mouse button is pressed : set X to Xmouse, Y to Ymouse

    On flag 0 on + (negate) repeate while mouse button is pressed : set flag 0 off

    should roughly work (there will be a little jump when you click on the object, this can be corrected by calculating the difference between mouse and object's position)

  7. #7
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag capabilities in mf2?

    Another solution would be to have another version of the object that would be created on the click. This other object would have a mouse movement.

    This solution might seem easier but i'm pretty sure the first is better

  8. #8
    No Products Registered

    Join Date
    Jul 2009
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag capabilities in mf2?

    I didn't know about the drag and drop movement property until I read this thread. I opened up MMF2 and sure enough, there it is... and it works without writing any events!

    I've been using the Drag Object for these sorts of things.

    //edit//

    I've made up a quick drag widget that works without the drag object or drag and drop movement property. It should work with the demo... I'd think. I haven't ever used the demo. Haha.

    Drag Widget

  9. #9
    No Products Registered

    Join Date
    Jan 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag capabilities in mf2?

    Hi guys
    Thank you for the info.

    Corentin,
    I’ve tried as you suggested and now I can grab items and drag them across the screen using the mouse. 10x :cool:

    Regarding grabbing an item and moving with it until placing it using keyboard(like taking a box in platform games and moving it to the other side of the room)- I’ve tried using flags but grabbing the object doesn’t always work.
    Here's what I've defined, can you maybe see what’s the problem?
    • upon collision between my image(obj_A) and a second object(obj_B)--- > a flag is set to on.
    • Defined to (obj_B) -Upon flag on & upon pressing space bar--> set position X according to (obj_A right side), and y position according to (obj_A top side).
    • Upon pressing space bar--- > set position X according to (obj_B ), and y position according to (obj_B).


    lost_child,
    10x for the widget. can you please explain how do I embed it within my project?
    p.s regarding the demo- If I want to buy mmf2 I need to try it and make sure it does answer my needs

    Cheers



  10. #10
    No Products Registered

    Join Date
    Jul 2009
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Drag capabilities in mf2?

    You have a few options actually. The widget's events are listed in its behavior. To find these events, click on the object. The object's "properties" window should show up. In the "properties" window click on the "Events" tab and then on the "Edit" button listed next to "Behavior #1".

    From here, you can copy the events into your own program.

    or

    you could paste the events into the Event editor and modify them slightly so that they point to a qualifier so that a group of objects can be dragged around.

    or

    you could simply clone the object however many times you need and replace the graphics with your own (when you clone the object, the behavior events will be cloned as well).

    Regardless of what you do, you will probably have to set up an event to prevent the mouse from picking up more than one of the objects at once.

    I've made up a new .mfa that shows two different ways to do this (although, I have no doubt that there are better ways to do it).

    Drag2

    In frame one, when two or more objects overlap, the events will pick the first object that the mouse was over.

    Frame two simply picks one of the objects when the mouse button is clicked. If all objects are overlapping eachother, it will cycle through all of the objects in order.

    I hope it's helpful.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. [Beta] Flash Capabilities
    By Pharanygitis in forum Beta Flash Extensions
    Replies: 10
    Last Post: 9th July 2013, 06:03 PM
  2. Potential buyer with questions about capabilities
    By BenDTU in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 9th September 2011, 06:55 AM
  3. Sound Capabilities
    By MBK in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 24th July 2008, 09:23 PM
  4. Multiplayer Online Capabilities?
    By Machina12 in forum Multimedia Fusion 2 - Technical Support
    Replies: 21
    Last Post: 8th June 2007, 03:30 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
  •