music not looping when published in FF and Chrome

Get help using Construct 2

Post » Tue Jan 31, 2017 4:46 pm

I have an intro screen with a button and when the button is pressed, the music starts:

Touch - introButton - play music looping -10 "bgMusic"

It loops fine in preview but when in browser it does not loop.

Any idea? Could this be a bug? Should I have system every tick check if music is silent and then start it - which seems crazy tough.

I have no code to stop it anywhere beside a music button which toggles the sound but I am not touching it during testing to make sure.
The code for music button is:
Touch on touched musicBtn audio set toggle silent
if audio is silent musicBtn set opacity 50
system else musicBtn ser opacity 100
B
8
S
1
Posts: 86
Reputation: 618

Post » Tue Jan 31, 2017 4:52 pm

make the music in .wav format, then reimport it. That will assure it will be imported and converted to the correct formats.

instead of looping does it just stop after 1 play through?
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Tue Jan 31, 2017 6:37 pm

I did import a wav format and yes it stops after playing once but just when published. I also change music file to see if that would make a difference but it is the same. Also I checked with other comp I made with same code and they loop so I am not sure what I am doing wrong here. There has to be something but the fact that it does not stop in preview and only when published is strange.
B
8
S
1
Posts: 86
Reputation: 618

Post » Tue Jan 31, 2017 6:45 pm

BWT when I run in debug mode it shows the looping.
B
8
S
1
Posts: 86
Reputation: 618

Post » Tue Jan 31, 2017 8:06 pm

when you saw "publishing" you mean you are playing it in Chrome..on a PC?

bring the music file into Audacity and make sure there's no empty space at the end of the music.
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Tue Jan 31, 2017 8:33 pm

I mean exported a HTML5 and playing the html file either locally or from a server.
B
8
S
1
Posts: 86
Reputation: 618

Post » Tue Jan 31, 2017 8:36 pm

I could PM you a link to the file if you want to look at it.
B
8
S
1
Posts: 86
Reputation: 618

Post » Tue Jan 31, 2017 9:08 pm

So I turned off everything except the intro button. Still the music stops even though it is set to looping. It just does not make sense.
B
8
S
1
Posts: 86
Reputation: 618

Post » Tue Jan 31, 2017 9:34 pm

OK. So I think it must be a bug because I made several test files and the same thing happens. So I will post in the bug section.
B
8
S
1
Posts: 86
Reputation: 618

Post » Wed Feb 01, 2017 4:21 am

Try putting the file in the sounds folder instead of the music folder.

and check this:
viewtopic.php?f=152&t=186148&p=1092739&hilit=music+loop#p1092739
B
88
S
43
G
71
Posts: 601
Reputation: 43,669

Next

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 27 guests