Search the Community
Showing results for tags 'Phaser.Loader'.
Found 5 results
phaser 3 addToFileList in Phaser 3
Damla Eker posted a topic in Phaser 2Hi everyone, Is there an equivalent of "addToFileList" in Phaser 3?
Damla Eker posted a topic in Phaser 3Hi everyone, Is there an equivalent of "addToFileList" in Phaser 3?
Phaser.loader - active loading canceled / reset
mikegordiyenko posted a topic in Phaser 2Hi all. I've created a game using some tutorials and examples. Suddenly I've found that used Phaser 2.0.3 instead of 2.6.2 so changed the file. And then the problem appears (in 2.0.3 everything works well). My game has 2 states. First is Load - where the loader image appears and then all other assets should be loaded (like in "load-events" example). Unfortunately it works not as expected. Only 2-3 files are loaded and then "Phaser.Loader - active loading canceled / reset" - this message appears in console. I've tried the following: removed game.load.start() from the function and checked game.load._fileList and game.load._flightQueue - they are both empty though there should be a list of files to load. Then I call the function containing the queue manually from console. After this game.load._fileList is full. Then game.load.start() also from console - and everything shows as it should be. What's wrong with the flow in states?
Load assets asynchronouslyHi, To make the preload faster, I need to load several assets after the preload phase, and use then when they has been loaded. To do that, I've used the Phaser.Loader object and register to "onFileComplete" Phaser.Signal to catch the file when has been loaded, to load the next file. This works well until I need to change the current state and there are an asset being loaded. When the file is loaded and the new state has been created, Phaser detects that the Loader is not loading (processLoadQueue method from Phaser.loader) and shows this message: 'Phaser.Loader - active loading canceled / reset', and the "onFileComplete" registered functions, are not fired, and I cannot continue loading more assets. My idea was to attach to "onStateChange" signal and stop/pause the current async download, but there are no public methods in Phaser.Loader to do that. Are there a good way to load assets asynchronously with state changes? Thanks
Whenever calling the .play() method of a Phaser.Sound instance I'm getting the following warning in my console: Phaser.Loader fileComplete invalid index 48. I'm loading two files per instance: OGG and MP3. Also, the sound will only play once and can't be looped or played again. How can I fix that?