Check if Music has finished playing?

Get help using Construct 2

Post » Sun Oct 23, 2011 6:16 pm

Is there a way to check if a sound / musictrack has finished playing?

The Audioobject doesn't seem to have any events at all :(
B
33
S
6
G
7
Posts: 338
Reputation: 7,424

Post » Sun Oct 23, 2011 7:40 pm

Good point, it's a useful event that is missing. Added for next build.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,620

Post » Sun Oct 23, 2011 9:33 pm

Yay thanks! :D
B
33
S
6
G
7
Posts: 338
Reputation: 7,424

Post » Sun Oct 23, 2011 9:54 pm

Great! I wasn't able to add looping to my music! This will be good!
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Sun Oct 23, 2011 9:56 pm

Looping works in some browsers but not others, I can't remember. Just make sure you test it so on browsers which do support looping you don't get the music playing twice.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,620

Post » Sun Oct 23, 2011 11:00 pm

@gammabeam i solved it by using a workaround using events... check how long the music is in seconds and then use system every x seconds -> stop music -> play music

doesn't work 100% but it'll have to do till the guys fix it :)
B
33
S
6
G
7
Posts: 338
Reputation: 7,424


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests