Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hello all, I was wondering... how would you go about making a button that resets/restarts music or sound fx when clicked or tapped? I don't see any reset or restart options for some reason:(
on button clicked :
Yea, but when you stop audio and then start it again, the song just plays from where it left off, and that's not what I want. I need the song to completely restart from the beginning when clicked.
Hey, tried what you said. It just keeps playing from where it left off. I don't get it.
Hey guys, please, can somebody help me out with this. I'd really appreciate it. It seems like it's something really simple, I'm just not seeing it:(
Hold on, let me have a go with a capx, be right back :)
OK, thanks a lot:)
Hmm, LittleStain's example worked for me...
Level starts, music plays, click button, music restarts from the beginning.
Do you have other sound playing at the same time? If so, make sure you are using the tags, maybe "Music".
I do use tags. I'm not sure why it wasn't working. I'll check out your capx and get back to you. Again, thanks a lot for the help.
Well, I just used it (your method) and it's still not working properly:( It keeps playing from where it left off. I don't get that... how would a stop function make it restart anyways?
My capx isn't working for you? I'm using Chrome, what are you using?
What if you have a silent track that's really really short.
Stop > play silent track > Stop > Play music
No, for some reason it's not. I'm using Firefox, I'm not sure if that's the problem. But, it might be because I wasn't using the updated Construct r150, I was using Construct r148 (I think). Do you think that might have something to do with it?
Here's the code:
<img src="https://dl.dropboxusercontent.com/u/54192518/Capture.PNG" border="0" />
<img src="https://dl.dropboxusercontent.com/u/54192518/Capture2.PNG" border="0" />
Would this work?
stop audio - seek to 0 - start audio
I'm not sure if it will work, but sounds in the music folder are streamed, so that could be the issue.
Develop games in your browser. Powerful, performant & highly capable.
I'll try that and see if it works. Thanks.