Phaser API Documentation

  Version: 
Event: ADD
Phaser.Loader.Events.ADD
ADD

Description:

The Loader Plugin Add File Event.

This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.

Listen to it from a Scene using: this.load.on('addfile', listener).

If you add lots of files to a Loader from a preload method, it will dispatch this event for each one of them.

Parameters:

name type description
key string

The unique key of the file that was added to the Loader.

type string

The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. image.

loader Phaser.Loader.LoaderPlugin

A reference to the Loader Plugin that dispatched this event.

file Phaser.Loader.File

A reference to the File which was added to the Loader.

Since: 3.0.0