User Tag List

Results 1 to 3 of 3

Thread: Math for determining mouse position to frame in sections?

  1. #1
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Math for determining mouse position to frame in sections?

    Sometimes my sucky math catches up with me. I needs to do the following:

    Populate a list object with a variable number of lines.
    Determine X or Y of mouse in relation to the frame based on the number of lines in the list.
    Select a line from the list based on that mouse position, regardless of the number of lines the list may contain.

    Example:
    If the mouse is at the very top of the screen, the first line of the list is selected.
    If the mouse is at the very bottom of the screen, the last line of the list is selected.
    If the mouse is in the middle of the screen, the middle line of the list is selected.
    Etc.
    Etc.

    I just need a formula for doing that...I'm sure it's not as tricky as it's currently seeming to be.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    seems like you just need mouse Y coordinate:

    Ymouse / (frame height / number of lines)
    (+1 if list has 1 index)

    assuming there's no scrolling involved

  3. #3
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Perfect! Thanks, schrodinger.

Similar Threads

  1. Save Frame Position Load Application Position
    By NotADuckMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 9th March 2015, 11:38 PM
  2. change position consistently by math
    By willy in forum Fusion 2.5
    Replies: 8
    Last Post: 9th January 2015, 08:33 AM
  3. easy math to convert mouse position to frame?
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 17th February 2010, 05:12 AM
  4. angle to mouse using MATH
    By Tuna in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 4th April 2008, 04:02 AM
  5. Mouse wheel object? Making zoom using math...
    By The_Alee in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 22nd August 2006, 01:39 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
  •