User Tag List

Results 1 to 9 of 9

Thread: [Request] On Mouse Move Object

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUnicode Add-on
    Tim's Avatar
    Join Date
    Apr 2007
    Location
    NSW - Australia
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Request] On Mouse Move Object

    is there an object that can detect an on mouse move event. Can it also detect which direction the mouse moved also.
    I am making a 3D FPS game and need this badly

  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: [Request] On Mouse Move Object

    Use the Position Controller (a beta version is in the File Archive). It comes with an example of how to detect mouse movement.

  3. #3
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] On Mouse Move Object

    if valuex <> MousePositionX
    valuez = 1

    if valuey <> MousePositionY
    valuez = 1

    if valuez = 1
    <do stuff>
    valuex = MousePositionX
    valuey = MousePositionY
    valuez = 0



    no need for an extension

    also I don't get how you can be making a 3d game (which is rather complex) without knowing this (which is rather basic).

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUnicode Add-on
    Tim's Avatar
    Join Date
    Apr 2007
    Location
    NSW - Australia
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] On Mouse Move Object

    :cry:

    This is my first attempt at it with opengl

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUnicode Add-on
    Tim's Avatar
    Join Date
    Apr 2007
    Location
    NSW - Australia
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] On Mouse Move Object

    @MechaBowser. I think I'm a bit slow, but what does
    valuex and valuey equal?

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] On Mouse Move Object

    Actually my method would work better for the purpose and be less cluttered

    valuex, valuey and valuez are just any variables. Be it global values or alterable values.

    in the <do stuff> you could do

    speedx = valuex - MousePositionX
    speedy = valuey - MousePositionY

    and speedx + speedy now contain the movement speed of the mouse for each frame.

    I've made an example showing this
    Download

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] On Mouse Move Object

    You forgot to change valuez back to 0 in your example.

    I'd not involve a "valuez" parameter though. I think this is a better way to do it.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUnicode Add-on
    Tim's Avatar
    Join Date
    Apr 2007
    Location
    NSW - Australia
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] On Mouse Move Object

    Thanks everyone for your examples.
    As you all probably know now I'm a visual learner

  9. #9
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Request] On Mouse Move Object

    Quote Originally Posted by Nifflas
    You forgot to change valuez back to 0 in your example.
    Technically a valuez is completely unnecessary in MMF2 but in certain other languages it is not :P

Similar Threads

  1. Mouse Move / Finger Move (Touchscreen)
    By Spyhunter in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 20th December 2013, 04:00 PM
  2. MMF - Did the mouse move event
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 26th April 2009, 06:20 PM
  3. Move mouse?
    By Blueberry in forum Extension Development
    Replies: 3
    Last Post: 26th January 2007, 07:13 PM
  4. [Request] Better version of the Mouse Object?
    By Dines in forum Extension Development
    Replies: 3
    Last Post: 4th December 2006, 05:07 AM
  5. Move object relative to mouse & click
    By Villy in forum File Archive
    Replies: 0
    Last Post: 8th November 2006, 09:26 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
  •