How to add music to a game?

0 favourites
  • 10 posts
From the Asset Store
Add SubRip (SRT) subtitles to your videos in Construct 3
  • Hey guys,

    I imported my favorite music track, added the audio object, and tried to play the track. But on the parameters window of the Play action, it tells me that there are no sounds imported (even though I can see the music under Music folder in Project view).

    If I import a sound to the Sounds folder, the sound will show up and I can play it, but the music still doesn't show up.

    What am I doing wrong?


  • OK looks like I got it to work, and found a bug in the process <img src="smileys/smiley17.gif" border="0" align="middle" />

    If I import the m4a, it doesn't show in the parameters window. If I import the ogg, it does show.

    If it was meant to be like this, then it shouldn't allow importing of m4a.

    Mods, Please move this thread to bugs, thanks.

  • I have imported many sounds to my game, and in my case the only thing that causes this problem u encountered.

    Is that i needed to setup the correct format within a sound editor.


    44.1 hrz

    16 bit

    Now i have downloaded samples from the internet that did have these specs.

    But when they did not work in construct 2 i only needed to open them in my sound editor, and then re-export the wav to 44.1 hrz & 16 bits.

    My gues is that not all wav "sound" files are build correctly.

    So in my case its not really a construct2 problem.

    Its just faulty music files.

    Resampling works everytime and the m4a does work as it is a fundamental extension for some browsers.

    <img src="smileys/smiley17.gif" border="0" align="middle" />

  • Could be, but I was importing from the music that comes bundled with Construct 2, so if the file format was wrong, it's still C2 issue (not a code issue, but still a C2 issue <img src="smileys/smiley1.gif" border="0" align="middle" />).

    I will keep this in mind though in case I get this in the future.

    On a second thought, the import succeeded for me, so regardless of the file format, I should have seen it in the Play parameters. Or if not, then I should have gotten an error importing. So there still is a bug somewhere.

    I can post capx and proper repro steps if it's not clear what the problem is.


  • m4a files are required for internet explorer only, whereas ogg files will work in chrome and FF ("only").

    When importing music, you need to have both the m4a AND ogg files (or import from wav or other supported sound format, in win7, ogg and m4a will be created by C2).

    It's not as much a bug as a "requisite".

    Having only a single sound file format is bad design due to the way the audio plugin works for now (due to the audio support in browsers).

  • True it doesn't work on Internet Explorer. So how exactly do you play the same music on all browsers? The imported m4a doesn't show up in the list of the action parameters when I add the Play action.

    Would really appreciate a "for dummies" step by step on making the same music play on all browsers (I do have both the ogg and m4a files).


  • Thanks Kyatric, that is correct, could you explain step by step how to add music (from the bundled music for example, but not necessary) such that it plays on all major browsers?

    I can't seem to get I.E. to work.


  • Each files are in ma4 AND ogg format.

    Let's say you want to have the music "MattOglseby - 1", you import "MattOglseby - 1.m4a" and "MattOglseby - 1.ogg".

    When you set the play action, it will pick the format according to the user's browser.

  • OK that worked. I actually tried this, importing files one by one - I already had the ogg imported, when I added the m4a, and it didn't work (this must be some bug of sorts but anyway) - and the m4a got renamed.

    If I import them ogg and m4a at the same time, it works.

    Thanks KYATRIC.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have what seems to be a similar problem...

    I'm simply trying to IMPORT an audio file into the Sounds folder. I just moved the sounds I'm trying to import into the right folders on my computer (for organization purposes). But, C2 says the files aren't even there when I go to import them.

    I'm trying to import mp3 files. Is that my issue or is it something else?

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