9 years ago by Lawn
Hi,
I receive the following error when I attempt to add background music to my project:
Uncaught TypeError: undefined is not a function
The error occurs on line 86 of sound.js - that line looks like this:
loadCallback( path, true, ev );
This error occurs on both Chrome and Firefox.
I am using the jumpnrun example as a template. Here is the code in question:
init: function() {
// Sound
var musicIntro = new ig.Sound( 'media/music/intro.*' );
musicIntro.loop = true;
musicIntro.volume = 0.5;
musicIntro.play();
I have intro.ogg and intro.mp3 files in the media/music/ directory. If I use a shorter audio file (like a sound effect), then it works as expected. The error only occurs if I use a longer audio file like a song.
I receive the following error when I attempt to add background music to my project:
Uncaught TypeError: undefined is not a function
The error occurs on line 86 of sound.js - that line looks like this:
loadCallback( path, true, ev );
This error occurs on both Chrome and Firefox.
I am using the jumpnrun example as a template. Here is the code in question:
init: function() {
// Sound
var musicIntro = new ig.Sound( 'media/music/intro.*' );
musicIntro.loop = true;
musicIntro.volume = 0.5;
musicIntro.play();
I have intro.ogg and intro.mp3 files in the media/music/ directory. If I use a shorter audio file (like a sound effect), then it works as expected. The error only occurs if I use a longer audio file like a song.