User Tag List

Results 1 to 7 of 7

Thread: I need to detect the direction the mouse is moved

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    I need to detect the direction the mouse is moved

    I'm trying to detect the direction (up, down, left or right) the mouse is moving.

    I have a grid of tiles that I want to drag either a row (left/right) or column (up/down) and I can't manage to make anything work.

    Any ideas?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: I need to detect the direction the mouse is moved

    You would use 2 global values, lastX and LastY, that are the previous frame's Xmouse and Ymouse.

    Using that you can calculate the angle that the user moved the move with trigonometry, or without trigonometry you can determine in which direction the mouse was moved the most.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: I need to detect the direction the mouse is moved

    Yeah, this is what I thought as well, I just can't seem to get a good result. I'll keep working on it, of course. I had seen someone posted about doing this, but I can't find that post.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: I need to detect the direction the mouse is moved

    I have an example but it won't work in flash and it's not that great a way of doing it. I think nivram made the file that I based it off of.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: I need to detect the direction the mouse is moved

    oh, it wont work in flash? bummer.

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: I need to detect the direction the mouse is moved

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=188404
    Will that work?
    Working as fast as I can on Fusion 3

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: I need to detect the direction the mouse is moved

    YES! that's the one I had seen before, thanks! I'll check that out!

Similar Threads

  1. Detect mouse click outside play area?
    By J3sseM in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 22nd October 2013, 03:39 PM
  2. Detect if the user has moved the window
    By K1kk0z90 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th November 2010, 04:30 PM
  3. TGF2 - Clicking when something is moved by mouse
    By kremuwa in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 23rd November 2008, 09:05 PM
  4. possible to detect mouse wheel scroll-up/down?
    By integrality in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 3rd January 2007, 09:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •