Stop the audio

0 favourites
  • 10 posts
From the Asset Store
100+ Musical High Quality Sound Effects for your game!
  • Hello,

    I'm using a sound for the game, and I've put it like this:

    -> System-> On start of layout-> audio-> play (music that is)

    Now what I want when I get out of this layout, the sound stops.

    I've proven the opposite:

    -> System-> On end of layout-> ...

    But it does not stop, can you say me some solution?

    Thank you.

  • Hey,

    Well, if I am not mistaken you have to do the following:

    (assuming you have imported the sound file correctly) let's say that the audio file is named "music"...

                                   Conditions -> Actions

    1) System/On start of Layout -> Audio/Play

                                   (Audio file)- select: music

                                   (Loop) - choose what ever you want

                                   (Volume) - "0" is the original volume of the sound file

                                   (Tag) - important! give it a tag, let's say "soundtrack". Leave the quotes.

    To stop the particular sound:

    2) System/On end of layout -> Audio/Stop

                                   (Tag)- "soundtrack".

    That's it! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • That's what I'm doing does not work.

    That is, the expose here, that is no longer where the error may be, or what may be the solution.

    You do not know another way to put the audio, so you can try to remove it otherwise?.

    Thank you.

  • Nobody gives me a solution to stop the sound?, Someone happened something? <img src="smileys/smiley19.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Post your CAPX see we can see what you are doing.

  • I leave CapX lionk discharge, so you can see where the error can be

    dl.dropboxusercontent.com/u/127488641/construct2/Naves%202D.capx

  • Hi fumeque,

    I looked at your capx, and you just needed to 'Tag' your sound with the same name you're calling in the stop action (i.e. Tag = "Sonido de Timbre pner en juegos").

    Here's your update project (capx fixed)

    Hope that helps :)

  • Solved.

    thank you very much <img src="smileys/smiley20.gif" border="0" align="middle" />

  • I am reminded of one thing. Since you have the CapX, haveis seen that I have a heart shaped objects?, I want to do is that when you destroy a ship is discounted a heart, it would be each of the lives.

    How I can do?

    Thank you. <img src="smileys/smiley13.gif" border="0" align="middle" />

  • eli0s- TY!!!! Nice outline. Works like a charm. Now, if I could just stop misplacing all of my code.

    Hey,

                                   Conditions -> Actions

    1) System/On start of Layout -> Audio/Play

                                   (Audio file)- select: music

                                   (Loop) - choose what ever you want

                                   (Volume) - "0" is the original volume of the sound file

                                   (Tag) - important! give it a tag, let's say "soundtrack". Leave the quotes.

    To stop the particular sound:

    2) System/On end of layout -> Audio/Stop

                                   (Tag)- "soundtrack".

    That's it! <img src="smileys/smiley1.gif" border="0" align="middle" />

    <img src="smileys/smiley17.gif" border="0" align="middle" /> <img src="smileys/smiley1.gif" border="0" align="middle" />

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