[SOLVED]Play audio from certain time?

Get help using Construct 2

Post » Fri Apr 04, 2014 5:49 pm

I found out that I can get how long an audio has playing for with Audio.playbackTime, but how can I play an audio from that time?
Like a pause, I need to save this playbackTime and than later play the sound from there, is it possible?
Last edited by caiorosisca on Mon Apr 07, 2014 6:27 pm, edited 3 times in total.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Mon Apr 07, 2014 2:24 pm

bump.
I'll explain my problem, I have a physics puzzle game, and when the player hits the stop button, all the objects go back to it's original position. I save the game whenever the player moves and object.
What's happening is that when I reload the game(on stop pressed), the music goes back to where it was when I saved game, how can I avoid that?
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Mon Apr 07, 2014 3:15 pm

According to the Manual: https://www.scirra.com/manual/109/audio

Seek to
Seek a currently playing sound to a different location in the audio file. The time to seek to is given in seconds.
B
44
S
10
G
8
Posts: 437
Reputation: 6,463

Post » Mon Apr 07, 2014 3:49 pm

Thanks @Ubivis, I must really have missed that, went throught the manual and didn't find it.
Just in case anyone is interested in how I solved it, I saved the playbacktime on WebStorage just before loading the game, then on load complete I play the sound using seek to webstorage.localvalue
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests