select audio at runtime?

0 favourites
  • 5 posts
From the Asset Store
A set of retro 16-Bit Neon UI elements to make your menus pop!
  • is it possible to select audio at runtime?

    I'm teaching a sound design class and I'm making a small little program in C2 but I want students to replace all the sound files with ones they create. Ideally I'd like them to drop them into a folder replacing my placeholder sfx. I'm Exporting to HTML5 but it looks as though the Sound folder is encrypted or encapsulated into a .js?

    any suggestions?

  • The audio files are all put in a media folder and can be replaced freely before or after export. The easiest way would be to require the same file names as your example files. Otherwise, you'll have to pull file names from an XML list or something.

  • C-7

    aren't sound files loaded into memory? how do you refresh?

    the only folder I see in the export directory is /images. I know you can make a subfolder under Files/ but you can't select that folder when you Audio.Play()

    EDIT nevermind those first two questions.. duh.. I can have students drop the files in before they run the program. but still, where do they copy them to?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • okay.. not sure what happened.. I reExported and now I see the media folder... I have both versions though, the first time there is NO media folder! I have no clue why..

    thanks C-7!

  • No problem! Glad it got cleared up! I suppose at runtime you could potentially make a call to preload or something, but there's no real use, just have them do it in first.

    Glad I could help!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)