AmAuron Posted June 15, 2015 Share Posted June 15, 2015 Hi there, i want to know how should i adress this issue,i have an audio file with the name "Kalimba", so for loading that to my game i used the functionthis.audio.load('kalimba', 'assets/audio/kalimba.mp3');Now my problem is i want to keep using the name "kalimba" (his key) but replace the file...so i want to overwrite it. I searched the documentation and the audio file is the only type of file that doesn't have a replace parameter.http://www.phaser.io/docs/2.3.0/Phaser.Loader.html#audioSo, my question is, how should i deal with this problem? Thank you for your time to read this topic, hope you can help me Link to comment Share on other sites More sharing options...
marein Posted June 15, 2015 Share Posted June 15, 2015 Hey AmAuron, you can calling the load method again in the preload function of your state where you need it. This works for me.// Some statepreload: function() { this.audio.load('kalimba', 'assets/audio/kalimba.mp3');}// Some other statepreload:function() { this.audio.load('kalimba', 'assets/audio/newkalimba.mp3');} Link to comment Share on other sites More sharing options...
Recommended Posts