Phaser API Documentation

  Version: 
removeByKey(key)

Description:

Removes all sounds from the sound manager that have an asset key matching the given value. The removed sounds are destroyed before removal.

Parameters:

name type description
key string

The key to match when removing sound objects.

Returns:
Description:

The number of matching sound objects that were removed.

Type:
  • number
Since: 3.0.0