User Tag List

Page 1 of 5 1 2 3 ... LastLast
Results 1 to 10 of 44

Thread: Loosing focus

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Sep 2009
    Posts
    356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loosing focus

    How can I check if game loses focus (eg. when player clicks on another window)?

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Loosing focus

    This is not implemented in the Flash runtimer, and I doubt it is feasable.

  3. #3
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    DizzyDoo's Avatar
    Join Date
    Oct 2006
    Location
    South England
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loosing focus

    Quote Originally Posted by Francois
    This is not implemented in the Flash runtimer, and I doubt it is feasable.
    Really? How does Canabalt pause the game when I click away? This would really be a key feature, if it could be done.
    Cranktrain - Currently finishing a new game called The Cat Machine!
    @MattLuard on Twitter.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Jun 2007
    Posts
    480
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loosing focus

    make only a active-object on the screen, mouse dont overlapping= lose fokus!

    we need the focus when the mouse is back on the screen is, set focus on or never lose focus

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Sep 2009
    Posts
    356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loosing focus

    Quote Originally Posted by Johnny
    make only a active-object on the screen, mouse dont overlapping= lose fokus!

    we need the focus when the mouse is back on the screen is, set focus on or never lose focus
    Yes, thats similar to what i'm planning to do. But how exactly set action "lose fokus"? Is there any extension?

  6. #6
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Loosing focus

    I've found that MMF reports the last position of the mouse 'in the frame' when you move it out of the Flash window area, so the Flash game would think your mouse is still on screen in that last position.

    Francois, any chance you could change what is reported when the mouse is not in the flash-window area? Even if you report it as a large negative value for Xmouse, Ymouse it would be better than where the mouse was last when it left the flash window area...you could then detect if the flash app has focus using this value.
    Andy H @ ovine.net
    Awful Jokes - a new cartoon every day: http://awful.ovine.net/
    Ovine's games: http://www.ovine.net

  7. #7
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    DizzyDoo's Avatar
    Join Date
    Oct 2006
    Location
    South England
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loosing focus

    But that isn't 'focus'. If I play a flash game that doesn't use the mouse, I usually move the mouse out the way, that isn't what I want to detect. I would like to know whether, if I press a key, the flash app 'gets' that key rather than the browser page or some other window.
    Cranktrain - Currently finishing a new game called The Cat Machine!
    @MattLuard on Twitter.

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleInstall Creator Pro

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

    Re: Loosing focus

    Quote Originally Posted by Johnny
    make only a active-object on the screen, mouse dont overlapping= lose fokus!
    Ok, but what should we do then? Probably pause the game, but this would interrupt gameplay of mouse-controlled games very much. Checking for mouse off screen is too general.

    The ability to detect lost focus would be great!

  9. #9
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Loosing focus

    Yes, the mouse focus in the Window is only useful if you control the game / app with the mouse. In case of pausing, you'd need to count your own idle counter so that it activates only after a desired length of time. But to do that we need the mouse coordinates to indicate you are no longer in the Flash window.

    For your specific problem Dizzy this obviously doesn't work as you point out. It would be a nice feature for sure.

    As a work around, you could always experiment with the "Has user left computer for ..." condition under the Timer object. This becomes true if you give your MMF game/app no mouse or keyboard input for the time you specified. Not specifically what you are asking for but it may help in the mean time.
    Andy H @ ovine.net
    Awful Jokes - a new cartoon every day: http://awful.ovine.net/
    Ovine's games: http://www.ovine.net

  10. #10
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Loosing focus

    I will investigate on the focus thing.

Page 1 of 5 1 2 3 ... LastLast

Similar Threads

  1. Loosing Mouse?
    By gbaker in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 8th May 2012, 06:00 PM
  2. Loosing Focus
    By Jason in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 5th October 2011, 07:27 PM
  3. Focus ... ?! Ford Focus ???
    By 2310 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 14th June 2011, 10:29 PM
  4. MMF focus bug
    By stAtrill in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 17th September 2007, 06:18 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
  •