User Tag List

Results 1 to 5 of 5

Thread: Button clicked? - Nothing happens

  1. #1
    Clicker Fusion 2.5HTML5 Export Module
    Allrounder's Avatar
    Join Date
    Jan 2014
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Button clicked? - Nothing happens

    An easy question methink ;-).
    Don't know exactly how MF2.5 works in this case:

    Line 13: Button "btn" clicked? --> Jump to frame number 2
    ...
    Line 22: Always --> "btn" Disable

    In this example nothing happens, no jump to frame 2.
    With inactivating Line 22 the jump to frame 2 works.

    Why is the click ingnored, although it's before the Disable?

  2. #2
    Clicker

    Join Date
    Jul 2011
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your program will loop through all lines (and disable your button) before you ever have a chance to click it.

    Think of the lines as a list of things that will happen each frame if the conditions you have set are met. (The order of events matters, but only when the conditions are met for each event... if that makes sense.)

    You will likely want to set a flag for your button and toggle it when the user's actions meet some criteria.

    Sorry, I'm having some trouble trying to explain. If you post your .mfa, I'd be glad to take a look.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,852
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The "always" line to disable the button is the issue. Delete that line and it will work! Why do you need to disable the button?

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by klikhappy View Post
    Your program will loop through all lines (and disable your button) before you ever have a chance to click it.

    Think of the lines as a list of things that will happen each frame if the conditions you have set are met. (The order of events matters, but only when the conditions are met for each event... if that makes sense.)
    This is semi-accurate.

    But the reason isn't because he has the Always event after the Button click event. Button clicks take priority over Always events anyway, so it doesn't necessarily matter as much where they are placed.

    The reason it's disabling the button is because of the Always event. The event is firing many times before he ever clicks the button. Since it's looping through the events at 60 loops per second, it means that button is being disabled 60 times per second. So there's no way he could humanly click the button before it got disabled. If that makes sense.

  5. #5
    Clicker Fusion 2.5HTML5 Export Module
    Allrounder's Avatar
    Join Date
    Jan 2014
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The reason for the always event was to disable the button, in order to enable the button with conditions in the next line (sorry forgot to mention that line).

    What Konidias wrote makes sense. Looks like that's the problem.
    I changed the "Always disable" to "With conditions disable".
    Now it works, no matter where the "Is button clicked" is placed.

    Thanks all for your answers. Helped me very much to understand how Fusion works.
    Btw ... Great community!

Similar Threads

  1. Button is clicked condition works even when button disabled - Beta9
    By AyreGuitar in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 29th May 2012, 03:29 PM
  2. [Bug] Repeat while left mouse button is clicked
    By ProdigyX in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 1st March 2012, 06:10 AM
  3. Keyboard lose focus when clicked Button object
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 26th December 2011, 04:07 PM
  4. Annoying sound after button clicked
    By dylan99379 in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 27th January 2008, 04:57 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
  •