Correct practice with buttons.

0 favourites
  • 8 posts
From the Asset Store
Basketball Practice is HTML5 game written in construct 2 and 3 engine that simulates hooping.
  • Hi all

    well, the question is the next:

    I have 3 graphics buttons: (btn_next, btn_back, btn_exit)

    Every buttons with sprite for 3 states.

    I have already created a button how it would work, but I want to do the same for the other 2 buttons.

    dude: What is the best way to work?

    instance?

    reply code for every button? (well... the actions)

    thx.

    PD.: this is my solution for 3state buttons.

    Link_Buttons

  • If you own a license this should be easier possible with a family containing all three buttons.

  • Please upload your capx to dropbox, I can't go past your filehost captchas.

  • So basically you want 3 buttons to have a normal state, a mouseover state and a clicked state?

    And this with as less events as possible ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • No Wyshy, I have ready a 3 states buttons. this works OK.

    now...

    I thinks, what I need for use this buttons in several diferents buttons?

    Joe7 speak of family... I need study it concepts, but if i can't work with "family" in a free licence, bad XD

    this night i will create the drobox, Kyatric.

    thx

  • button.capx

  • Sorry, I was disconnected.

    Thank you Yann, this is a 3states button that I created. XD

    I have problem to create dropbox.

    now, I want to duplicate this button 5 times, but when I click on them then call perform different tasks.

    thanks.

  • Make a general sprite button that has all the functionality you want. Add an instance variable called something like "tag" or "type" and set it to somethin you can use for one kind of button

    The exit buttons tag would be "exit" or 0 however you want to do it. Then when the buttons clicked compare the instance variable and check for "exit" if so then do your exit events

    Repeat for each type of button

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)