Sound/Music On/Off Button problems

0 favourites
  • 3 posts
From the Asset Store
6 looping tracks to use in your games and projects. These tracks are in the style of the 1960s detective movie genre.
  • I'm doing my best, but can't seem to figure it out. When I click (or touch) an icon (a music icon in this instance for sound disable/enable) I want it to go to the next frame, showing the same icon with an X over it. Just a graphical issue. When I program this in various ways, it either goes to the right frame, but won't go back when clicked again. Or it won't activate at all.

    I have uploaded the CAPX file so it can be looked at.

    MenuControlSheet has the options I've been working with, though I've thought the code should be in the SettingsSheet.

    I would appreciate if someone could help me out with it.

    NEEDED RESULT:

    Go to Settings Screen

    Click on Music icon and it changes to the Music with X icon, and turn off all music (which seems like it has to be done in it's own time since I don't have any music yet).

    I'm most interested in the graphical implementation rather than the functionality of the purpose at the moment.

    Below is the link to the ZIP that contains the CAPX.

    Download ZIP of the CAPX

  • The simplest solution is to have the button simply add to a variable when clicked, this way you won't get the thing toggled twice like you have right now. Both sub events are triggered because the first sub event changes the variable and makes the condition on the second sub-event true.

    Here's a simple example just using the animation frames without any variables - all it does is count through the three frames and test which frame is displayed, and adjust sound based on that.

    http://johnnysix.net/games/sound/

    Download here :

    http://johnnysix.net/games/sound/J6Soundexample.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Awesome, thank you very much! I had to get the R100 beta to use it. I hope the full version comes out, beta stuff is always iffy. Either way, thanks again!

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