User Tag List

Results 1 to 5 of 5

Thread: making a button

  1. #1
    Clicker Multimedia Fusion 2 DeveloperAndroid Export Module

    Join Date
    May 2010
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    making a button

    This is an absurdly simple question I imagine. One of the things I have never been able to figure out is how to make a button so that when I press it, item X appears, and then when I press it again, item X disappears.

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: making a button

    Set an Alterable Value.

    Button is pressed
    +Alterable Value of button= 0
    Set alterable value of button to 1

    Alterable value of button=1
    +Only one action when event loops
    Object appear

    Button is pressed
    +alterable value of button = 1
    Set alterable value of button to 2

    Alterable value of button=2
    +Only one action when event loops
    Object invisible
    Set button alterable value to 0

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: making a button

    I've always had to use an alterable value delay for actions that are duplicate but toggle something else. In nivram's example for me it would act like the button was pressed twice in the same moment and then it would only register the last duplicate action in the events.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: making a button

    To add to what Marv said, you could also toggle a flag:

    Button is pressed
    +Toggle Flag 0

    Flag 0 is on
    Only once while event loops
    +Object Reappear

    Flag 0 is off
    Only once while event loops
    +Object Invisible
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  5. #5
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: making a button

    StephenL's example would actually work for me without the need to use an alterable value delay because there's only one "button is pressed" action.

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, 02:29 PM
  2. Touch Joystick, Fire 1 Button, Fire 2 Button
    By ProdigyX in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 13th February 2012, 01:37 AM
  3. making sound button objects from explorer
    By isomortal in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 1st October 2011, 06:30 PM
  4. Button CS (Sphax Button)
    By DJFuego in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 11th February 2010, 11:19 PM
  5. Making swing as fast as the push of the button
    By RagingTiger in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 1st January 2007, 01:50 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
  •