Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Loader
/
Loader Events
Phaser 4.1.0
Phaser 4 examples
Loader Events
13
examples
Examples
13
Add Files During Load
Demonstrates how to dynamically add new assets to the loader queue from within a loader event callback while the loading process is already in progress.
Destroy Game During Load
Demonstrates how to safely destroy a Phaser game instance while the Loader is actively processing a queue of assets.
Display File As Loaded
Demonstrates using the loader 'filecomplete' event to add images to the scene immediately after they finish loading while sequentially triggering the next load.
File Complete Event
Learn how to use the 'filecomplete' event on an individual file loader to execute a callback as soon as a specific asset has finished loading.
File Complete Event with Key
Learn how to use specific file completion events to trigger actions as soon as a particular asset finishes loading, using the 'filecomplete-type-key' event string.
File Progress Event
Learn how to use the 'fileprogress' event to monitor the loading progress of a specific individual file within the Loader.
Load Multiple Images
Demonstrates loading a large quantity of individual image assets and displaying them by iterating through all keys in the texture manager.
Loader Duplicate File Handling
Demonstrates how the Loader handles requests for files that are already in the cache, verifying that the 'complete' event still fires correctly when no new files need to be processed.
Loader Progress Bar
Demonstrates how to use the loader's progress event to create a visual loading bar while assets are being loaded.
Loading Assets from External URLs
Demonstrates how to load assets using absolute URLs, which bypasses the loader's setBaseURL and setPath settings to fetch files from different domains.
Multi-File Loader Progress
Learn how to use the fileprogress event to track and display the individual loading progress of multiple assets in the loader queue.
Play Animation During Load
Learn how to use the Scene 'pack' property to load a spritesheet early, enabling an animated loading screen while a large batch of secondary assets is being processed.
Start Loader Manually
Demonstrates how to initiate the loader manually using this.load.start() outside of the preload function, including how to dynamically add files to the load queue as others finish.