Jump to content

Phaser.loader - active loading canceled / reset


Recommended Posts

Hi 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?

Link to comment
Share on other sites

  • 2 weeks later...

I have similar problem and sims like it's not because of code.


1. I have windows 10

2. I use grunt and grunt-contrib-connect - with this http server i don't have any chance to load all resources.

3. WebStorm and python simple http server has the same behaviour. At first it load several images (4 or 5), when you reload, it load another images =). and on 3d page reload it loads everything =) (and it works like this because it doesn't reload cached items).


So i little bit googled and found this page https://community.spiceworks.com/topic/980907-windows-10-maximum-connection-limits

It show that windows 10 has limit of 20 incoming tcp connections and maybe this is an issue, not the phaser or main code.


p.s. and sorry i'm newby with Phaser, just started to learn it and still at war with configs and environments =)



Ah.. and here is a code used by loader.




the issue was solved in the slack channel by @phreaknation

problem in loading in create() function need to be in preload()


Edited by nicloay
issue solved
Link to comment
Share on other sites

  • 3 weeks later...

It's impossible to tell what's causing your problem, but consider:

  • Call load methods only in preload, never elsewhere
  • Never call load.start() or other control methods; it runs automatically
  • Never change states except from create or update

Your best bet is to start fresh from a valid state structure (any phaser.io/examples, or Project Templates/Basic), add your code in piece by piece, and test each time.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...