How do I import audio files and play them back on runtime?

Get help using Construct 2

Post » Thu Oct 01, 2015 6:11 pm

@Ashley, i do not have the ability to import all 5,000 sounds.

Is it possible to rename the root folder that the sounds are hosted on and make C2 point to that specific folder even if it is on another server?

If not, how can i import an audio file on demand on runtime?
B
106
S
20
G
8
Posts: 155
Reputation: 11,716

Post » Mon Oct 05, 2015 4:26 pm

@Ashley, @rojohound, @newt, @wmsgva

Is this something that can be accomplished?

Perhaps, renaming the root folder where the sounds are hosted and make C2 point to that specific folder even if it is on another server. Any thoughts?
B
106
S
20
G
8
Posts: 155
Reputation: 11,716

Post » Mon Oct 05, 2015 11:34 pm

Ashley's answer on your other thread seems reasonable.
Image ImageImage
B
169
S
50
G
169
Posts: 8,286
Reputation: 108,216

Post » Tue Oct 06, 2015 6:06 pm

@nimos100 Thank you for your time and help.

To confirm, this DID work for you and you were able to PLAY audio files that were sitting on your "local C: hard drive" and NOT the "sounds" folder within C2, correct?

I tried this exactly, but was not able to make your workaround work, even for files sitting on my local C drive. I followed your example exactly as described. Do you think that you can share a simple .CAPX, just to see if i missed something.

Thank you in advanced for your continued assistance...
B
106
S
20
G
8
Posts: 155
Reputation: 11,716

Post » Tue Oct 06, 2015 6:18 pm

@nimos100 & @Animate

i tried the example as well without success .... a sample .CAPX would be a huge help!

thanks!!!

-Rik
B
9
S
2
G
1
Posts: 17
Reputation: 669

Post » Tue Oct 06, 2015 8:03 pm

Animate wrote:@nimos100 Thank you for your time and help.

To confirm, this DID work for you and you were able to PLAY audio files that were sitting on your "local C: hard drive" and NOT the "sounds" folder within C2, correct?

I tried this exactly, but was not able to make your workaround work, even for files sitting on my local C drive. I followed your example exactly as described. Do you think that you can share a simple .CAPX, just to see if i missed something.

Thank you in advanced for your continued assistance...


Rik Marshall wrote:@nimos100 & @Animate

i tried the example as well without success .... a sample .CAPX would be a huge help!

thanks!!!

-Rik


Here is an example that will let you load and play an audio file from your computer.

Image

Capx:
https://dl.dropboxusercontent.com/u/109921357/Play%20sound%20file%20from%20disk/Play_sound.capx
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Previous

Return to How do I....?

Who is online

Users browsing this forum: David181, evillair and 62 guests